PuTTY – Public Key Authentication
Public key authentication is an alternative means of identifying yourself to a login server, instead of typing a password. It is more secure and more flexible. One advantage is no need to type the username and password every time when you logged onto your linux machine using puTTY.
STEP 1: Open PuTTYgen and under Parameters you should see the defaults of SSH-2 RSA and 1024 for number of bits in generated key.
These settings are fine, and you can just leave them.
STEP 2 : Click the "Generate" button and a progress bar will appear. PuTTYgen will ask you to move the mouse around to "generate randomness"...just move the mouse around in the blank space using random motions while it processes
STEP 3: Save Private Key . [Key Passphrase is optional]
STEP 4: Copy the content of Public key( Ctrl+C)
STEP 5: Open the Linux Box using Putty and go the directory ~root/.ssh [Assuming you logged in using root, suppose if you logged in as user then go to ~user/.ssh]
STEP 6: Create a file called authorized_keys inside ~root/.ssh
STEP 7: Copy the public key contents( obtained in STEP 4) on to the file ~root/.ssh/ authorized_keys
STEP 8 : chmod 600 ~root/.ssh/authorized_keys , chmod 700 ~root/.ssh/
STEP 9: Uncomment the below line in /etc/ssh/sshd_config( if commented)
PubkeyAuthentication yes
STEP 10: Rrestart SSH server(sshd)
Putty Configurations:
1)Open the PuTTY session and browse the private key file obtained in STEP 3 .[ SSH->Auth]
2) Select Connection->Data and type your username as root in the “Auto-login usename “ text field.
3) Enter the Hostname , select the Protocol as ssh and save the the session for future use . Click on Open you will be logged onto the machine using public key authentication.
Please find the attached PuTTYGen binary. EnJOY- PuTTY
http://openssh.com/
Soure -Internet