VMRack
Home
Products
Solutions
Pricing
Support
Referral Program
Articles
VPS Tutorial Center
How to Quickly Detect CN2 GIA Lines?
No Speed Drop During Peak Hours: How Does CN2 VPS Actually Perform During Network Congestion?
CN2 GIA vs. AS9929 vs. CMIN2: Which is the Stablest Outbound Route in 2026?
The Importance of GIA VPS in Cross-Border Operations
Guide to Selecting US VPS Servers: The Advantages of Los Angeles Data Centers
Cost-Effective US Cloud Server Recommendation: Unveiling VMRack Los Angeles Node Performance
Why CN2 Line VPS is the Foundation for Stable Remote Desktop Connections?
Why is the US CN2 route crucial for multi-store management in cross-border e-commerce?
GIA Line vs. GT Line: Why GIA is the Top Choice for Stable Return Trips to China
Recommended high-performance CN2 VPS in 2026
What are the characteristics of CN2 GIA line VPS?
US Los Angeles CN2 GIA VPS Recommendation!
How is the latency of the US CN2 GIA server?
VMRack: A reliable CN2 GIA VPS - Recommended
A compilation of affordable and reliable US CN2 VPS promotional plans for 2026
Recommended High-Performance VPS CN2 Servers and GIA Line Identification Guide
VMRack premium VPS test across three networks
VMRack Triple-Network Platinum VPS Line Test
Troubleshooting and solutions for SSH connection failures to remote servers
How to apply for an SSL certificate using VMRack
GIA CN2 VPS Server Basic Environment Configuration and System Acceleration Tutorial
What to do if the cloud server can be pinged but cannot be connected via SSH?
What to do if SSH connection fails?
How to quickly apply for a free SSL certificate
What are the methods for remotely connecting to a server via SSH?
Recommendations for useful SSH remote connection tools
A Roundup of SSH Remote Server Connection Tools
How to solve SSH connection failure?
Recommended US VPS for stable website hosting
What should I do if my SSH connection to the host gets stuck and doesn't move?
VMRack US-based cheap, high-bandwidth VPS recommendations
Recommended good US VPS with 9929 lines!
How to quickly resolve VPS ping issues
Recommended US-based unlimited traffic VPS!
The VPS can be pinged, but web pages cannot be opened.
Are cheap Windows US desktop computers worth buying?
VMRack US VPS Recommendation!
Recommendations for reliable US native IP VPS!
Which is better, CMIN2 or CN2 GIA?
What to do if I can't connect to my VPS via SSH?
How is the CMIN2 line?
What are the advantages of a Los Angeles CN2 VPS?
The VPS IP can be pinged but cannot access the internet?
Recommendation for High-Performance 9929 China Unicom Optimized VPS
Recommended mobile CMIN2 VPS for 2026!
Some recommended useful SSH tools!
How is VMRack's CMIN2 line VPS?
How do I set up passwordless SSH login on Windows? (2 methods)
  1. Articles
  2. /
  3. VPS Tutorial Center
  4. /
  5. How do I set up passwordless SSH login on Windows? (2 methods)

How do I set up passwordless SSH login on Windows? (2 methods)

VMRack
VMRack
2026-08-21
Not sure how to set up passwordless SSH login on a Windows PC? Read this article to discover two methods for configuring passwordless SSH access from Windows to a Linux server. Let's take a look!

Every time you use SSH to remotely connect to a server, you have to enter the password manually. After disconnecting, you have to enter it again the next time you connect. So, is there a way to set up passwordless SSH login to a server on Windows? Absolutely. This article introduces two ways to configure passwordless SSH login from Windows to a Linux server, helping you say goodbye to the hassle of repeatedly entering passwords.

passwordless SSH login

What Are the Methods for Passwordless SSH Login on Windows?

The key to passwordless SSH login on Windows lies in asymmetric encryption, which uses a pair of matching keys: a public key and a private key. The public key is uploaded to the cloud server, while the private key is stored locally on your Windows computer.

When you use SSH to remotely connect to a server, the server and your local computer automatically use this key pair to authenticate your identity. The public key is like a secure lock installed on the server, while the private key is the unique key you carry with you. As long as the key and lock match, you can log in directly without entering a password.

Method 1: Use the Built-in OpenSSH Feature

Windows 10/11 comes with the OpenSSH Client, a set of SSH client tools that allows you to connect to servers directly using SSH commands. You can also use ssh-keygen to generate an SSH key pair for passwordless login. The following steps explain how to configure passwordless SSH login.

1.Open CMD on your Windows computer, enter the following command, and press Enter.

ssh-keygen -t rsa -b 4096
RSA 4096-bit algorithm

Explanation: This command generates an SSH login key pair using the RSA 4096-bit algorithm.

2.Next, you will be prompted to specify where to save the key and set a passphrase for the private key. Simply press Enter to keep the default settings.

default settings

3.Open the directory where the keys are stored. The default location is C:\Users\Username.ssh. You will see that id_rsa (the private key) and id_rsa.pub (the public key) have been generated.

Open the directory where the keys are stored

4.After generating the SSH keys, run the following scp command in CMD. Then, enter your cloud server password to copy the public key file to the cloud server.

scp C:\Users\qi.ssh\id_rsa.pub root@50.118..:/root/
copy the public key file to the cloud server

Explanation:

  • scp: A secure file-copy command.

  • C:\Users\qi.ssh\id_rsa.pub: The path to the local SSH public key file on Windows.

  • root@50.118..: The remote server login username and IP address.

  • /root/: The destination directory on the server.

5.Next, use the ssh username@server IP command to log in to the cloud server, and then run the following command to create the SSH key authentication directory.

mkdir -p ~/.ssh
create the SSH key authentication directory

6.Run the following command to append the uploaded public key to the SSH authentication file authorized_keys.

cat /root/id_rsa.pub >> ~/.ssh/authorized_keys
SSH authentication file

7.Run the following commands in sequence to set the appropriate file permissions so that the SSH service can accept the public key.

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
file permissions

8.These are all the steps required to configure passwordless SSH login from Windows to a cloud server. You can now run the following command in CMD to connect directly to the cloud server without entering a password:

ssh root@50.118..
passwordless SSH login

Method 2: Use an SSH Key Provided by a Cloud Service Provider

In addition to using ssh-keygen to generate an SSH key pair for passwordless login, some cloud service providers also allow you to add an SSH public key directly. One example is VMRack.

VMRack is a global cloud infrastructure provider offering cloud servers with premium network routes such as CN2 GIA, AS9929, and CMIN2, as well as CDN, object storage, cloud transcoding, and other services to meet the diverse deployment needs of businesses and developers.

The following steps use VMRack as an example to explain how to achieve passwordless login using an SSH key provided by a cloud service provider.

1.First, register for an account on the VMRack website and log in. Then, go to the console and select Cloud Computing > SSH Keys, and click Create SSH Key.

Create SSH Key

2.In the pop-up window, enter a name for the SSH key, select Create Key, and click Save.

enter a name

3.After saving, a file named L2.pem will be downloaded automatically. This is the private key file, so make sure you remember where it is stored.

L2.pem

Note: In this tutorial, the L2.pem file is stored in C:\ssh.

4.In the VMRack console, select Cloud Servers, find the cloud server for which you want to enable passwordless SSH login, and click Manage on the right.

Manage

5.In the cloud server details, select SSH Keys, and then click Create SSH Key.

Create SSH Key

6.In the pop-up dialog box, select the SSH key named L2 that you just created, and click Save. The cloud server is now associated with the L2 SSH key.

select the SSH key

7.Open Windows PowerShell and run the following command to remove the permissions inherited by the L2 private key file from the Windows file system.

icacls C:\ssh\L2.pem /inheritance:r
remove

Note: Replace C:\ssh\L2.pem with the actual path where your private key file is stored.

8.Next, run the following command to grant the current Windows user, qi, read permission.

icacls C:\ssh\L2.pem /grant:r qi:R
read permission

9.Run the following command to create a config file in the default directory used by Windows OpenSSH, C:\Users\qi.ssh.

notepad C:\Users\qi.ssh\config
create a config file

Note: The config file has no file extension and is not a .txt file.

10.Go to C:\Users\qi.ssh, open the config file, and enter the SSH configuration as shown in the example, then save the file.

SSH configuration

Explanation:

  • Host: Sets the login alias.

  • HostName: Specifies the server IP address.

  • User: Specifies the login username.

  • IdentityFile: Specifies the path to the private key.

11.You can now run the following command in Windows PowerShell to log in to the cloud server without entering a password:

ssh L2
log in to the cloud server

Conclusion

This article introduced two ways to configure passwordless SSH login from Windows to a cloud server. The first method uses the built-in OpenSSH feature in Windows, while the second uses an SSH key provided by a cloud service provider. Both methods make it easy to set up passwordless SSH login. You can choose the method that best suits your needs.

Related articles
  • What to do if the cloud server can be pinged but cannot be connected via SSH?
  • US Los Angeles CN2 GIA VPS Recommendation!
  • How to quickly resolve VPS ping issues
  • Which is better, CMIN2 or CN2 GIA?
  • How is VMRack's CMIN2 line VPS?
VMRack
  • Products
  • VPS Hosting
  • VPS Hosting
    Unmetered
  • Bare Metal
  • GPU Rental
  • CDN
    Public Beta
  • Custom CDN
  • Object Storage
    Public Beta
  • Transcoder
    Public Beta
  • Solutions
  • Bring Your Own IP (BYOIP)
  • Customized Server Solutions
  • Colocation Services
  • Resources
  • Pricing
  • Help Documentation
  • Articles
  • Developer Center
  • Referral Program
  • Contact
  • Company
  • About Us
  • Terms of Service
  • User Agreement
  • Privacy Policy
  • Service Level Agreement