Automatic SSH login with Putty

3669833456 cfb2310284 m Automatic SSH login with PuttyIf you use Putty to connect via SSH to your websites often, you might save a lot of time by automating the whole process through few simple steps.

  1. You will need PuTTYgen which you can download here
  2. Start it and click generate to generate a random key
  3. Enter a pass-phrase for the private key (I recommend not skipping this step, but entering something simple like a three digit number). Save the file.
  4. Copy the generated public key (that’s the whole content of the box beginning with ssh-rsa …).
  5. Log into your server, and edit the file ~/.ssh/authorized_keys. Paste the public key you copied previously.
  6. Start Putty, load your session. Go to Connection->Data and type in your login username
  7. Enter Connection->SSH->Auth and browse for the Private key file you saved previously
  8. Go back to Sessions, and Save the changes

That’s all. Next time you open your session all you have to do is type in the three digits passphrase you used before and you will be logged into the server.

I use SSH about 10-20 times a day. This procedure saves about 20 seconds of time. So I am saving 30-40 hours of my life yearly thanks to it. Makes you wonder…


Related Articles:

Comments are closed.