Passwordless SSH Login using Putty

To login to the server using putty without providing the password we need the puTTykey gen software.

Download the software from the following link.

  • Download the software from the link

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html the file name in that link is puttygen.exe

  • Open the software by double click on that the snap shot of that software is as follows.

 

pswd-less1

 

  • By clicking the generate button we will generate the key pair.

 

pswd-less2

 

We have to move the mouse pointer on the blank space to generate the key pair. By moving the mouse pointer in the blank space only the key pair will be generated.

  • After generating the keys, provide the pass phrase if you want otherwise leave that as blank.

 

pswd-less3

 

  • Now login to the server machine and create files in /root/.ssh/ directory.

 

pswd-less4

 

In the above screen shot the copied text is place in the server.

Go to the server open the file 

#Vim /root/.ssh/authorized_keys
sh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgld9aF9mraiSm46Eb0iqEC8zaBYSA3dJfG32vVjwQ1
X4fnfqma6WBtWG7d7jkudc7MmQaVNIqhDn245wIJkmGUCFYXnqJjXti5ecaXu8L5
e0Ltpco5Mk82Z316i0gZc9JCQEdT58G2xeozU49PI584W+UNVRRuRzChW83CM0
CkUaDthZ2F4UhLV9a0vP1JKv0V1GZtVIrDJETgSZnZXYiLiQ8gnsm0xqSiM2HxhjSt
WdLWeIZS1bDHhfEt4umaVP2XUGmB4dP59tMLLMNZ7OTjnJoQ+mMMq4A+lhj98
08g20KMjypDWHtKo41p1XsLdMkZJd9FDnaqautv3CHhhcgQ== rsa-key-20160321
~
~

 

Paste the text as shown above.

Now the public key is in the server

  • Next duty is save the private key to the local machine and loads the file to the putty as follows.

 

pswd-less5

 

  • Save the key in a particular location in your system. I saved the private key in the libraries and documents location. Similarly save the public key also.
  • Now configure putty to access the server.

 

pswd-less6

 

 

pswd-less7

 

Getting the error key rejected.

Have to work more on it