Thursday, January 31, 2008

Linux ssh autologin with putty

html">

ssh autologin with putty

This article shows how to do it when

connecting from a windows machine using putty to a linux box.


1. download PuTTYgen and start it.

2. at the bottom of the window, select SSH2 RSA

3. click generate and start moving your mouse over the blank part of
the window until the bar is filled and it shows some more options.

4. change the key comment to something meaningful like the name of your computer or you

5. save the private key (and if you want for later use, save the public
key too, but we don’t need this one for our auto login)

6. copy the public key from the textarea at the top of the window and
paste it into the ~/.ssh/authorized_keys file on your server you want
to logon in the home directory of the user you want to logon as. if
this file doesn’t exist yet, create it. (you may again want to
save the copy/pasted key to a text file on your computer in case you
have some more servers you want to auto-logon, so you can always open
it and copy/paste it from that file)

7. start putty and load your server settings

8. go to Connection–>Data and enter the username you want to
login as in the up most field “Auto-Login username”

9. go to Connection–>SSH–>Auth and choose the newly
reated private key file you saved before in the last field
“Private key file for authentication” by hitting the browse
button.

10. go back to Session and save all these settings.


now your’re done. from now on you will automatically be logged in when you open a session to that server


somem more tutorials for this and other os’s can be found here: http://wellsi.com/sme/ssh/ssh.html

More here for linux as well http://wiki.dreamhost.com/index.php/SSH#Passwordless_Login


No comments: