How to Setup Passwordless SSH Connect from Windows to Linux

Mert Ilis
2 min readOct 9, 2020

This is how you can connect (ssh) from your Windows 10 machine to your Linux server (CentOS in my case) without entering the SSH password.

  • First, open “PowerShell” and execute the following command to generate public/private RSA key pair:


ssh-keygen generates public/private rsa key pair

You can click enter without entering anything for a default file location and empty passphrase.

  • Your public key has been saved in C:\Users\[username]/.ssh/ if you didn’t change the file location.
  • Open with Notepad++ so that we can append the generated SSH public key to existing keys in the destination server.
  • Connect to the destination server using ssh and your password from PowerShell.
  • Open the “authorized_keys” file with vi:

vi ~/.ssh/authorized_keys

  • Copy the contents of the “” (which was open in Notepad++) and append to the “authorized_keys” file in the Linux server.
  • Save your changes in the Vi editor:


Now you can quit your ssh session and connect again but this time no password will be asked.

Hope it helps!

Mert Ilis

I’m a software development enthusiast who likes trying different web technologies and adding value to his team.

Recommended from Medium