JustPaste.it

How to set up Passwordless login to server by using PuTTy SSH key authentication?

SSH (Secure Shell) is a cryptographic protocol that allows a secure and encrypted connection to be established over an unsecured network. It is commonly used for secure remote system access.

 

Setting up PuTTY SSH key authentication without a password provides a convenient and secure way to connect to remote services. This authentication method eliminates the need to enter a password each time you login via PuTTY by using public-private key pairs. In this post, we'll provide steps to set up PuTTY SSH key authentication

without a password, giving user a more efficient and secure way to connect to their servers.

 

Download PuTTY and PuTTYgen:

 

Download and install PuTTY on your local system, if you don’t have.

 

Generate SSH key:

 

Download PuTTYgen for passwordless login.

 

Open PuTTYgen, select the type of key and set the key bit count to 2048 or 4096. Then click on generate.

 

Move the mouse continuously to create the randomness on the key.

 

Click, save private key file and save it in private directory.

 

Click on save public key to save the public key.

 

Copy Public Key to Server: 

 

Copy the content of the public key and add it into the server ~/.ssh/authorized_keys file.

 

Configure PuTTY connection:

 

Open PuTTY configuration windows, In the hostname section, enter the remote server IP address or username.

 

Set the connection type to SSH and port to 22.

 

Specify the private key:

 

In the PuTTY Configuration window, navigate to Connection>SSH >Auth.

 

 

Double click on Auth and click on Credential. Click on browse and open the save private key.

 

Saving Session:

 

Go back to the Session category and enter name in "Saved Sessions" and click "Save" to save session for later

use.

 

Connect to server:

 

PuTTY should use your private key for authentication, allowing you to log in without entering a password.

 

You will now set up PuTTY to use SSH key authentication, providing a more secure and convenient way to access

your server without the need for a password each time you connect. Ensure that you keep your private key

secure and only share your public key with the servers you want to access.