ssh_autologin_with_putty

SSH Autologin with Putty

this is a follow-up to my article about how to ssh auto-login from one linux machine to another. This article shows how to do it when connecting from a windows machine using putty to a linux box.

  1. if you have been using only the putty.exe executable so far and you did not install the whole package, download PuTTYgen
  2. start PuTTYgen
  3. at the bottom of the window, select SSH2 RSA
  4. 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.
  5. change the key comment to something meaningful like the name of your computer or you
  6. 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)
  7. 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)
  8. start putty and load your server settings
  9. go to Connection–>Data and enter the username you want to login as in the up most field “Auto-Login username”
  10. 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.
  11. go back to Session and save all these settings.

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

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

  • ssh_autologin_with_putty.txt
  • Last modified: 04.12.2017 16:53
  • by Pascal Suter