Like most of my articles, this one was written as a reminder to myself.
How to Setup Putty to Automatically login.
- Download PuTTY — Use this link or Google putty. Be sure to download. I would suggest this version – A Windows installer for everything except PuTTYtel
- Install Putty by double clicking
- Run PuTTYgen following the instructions
- Save your private key somewhere secure but also a place you will remember it.
- Copy / CTRL -C the public key for pasting into the authorized_keys file
- Remember dont select a passphrase if you want to login automatically
- Go to your .ssh folder in the root directory of your webhost — type cd .ssh. Almost all hosting providers have these.
- If you dont have a file called authorized_keys in the .ssh folder you will need create one.
Make it readable only by you type chmod 644.
- Paste the content from puttygen on a newline the authorized_keys if there is already an entry.
- Then you can either use Pageant ( included with Putty Details Below ) and load your private key in memory or goto Connection->SSH->Auth and under Private-key, browse to the file you had saved earlier on your computer. I would recommend instead using Pageant. I know, sounds like a pain doing all of this but it will save you some serious time login . Again Pageant recommended see below.
- Be sure to type in your connection name always as firstname.lastname@example.org. You can automatically login but the system needs to know what user you will login as.
Details on Pageant:
Getting started with PageantTo add a key to Pageant, press the ‘Add Key’ button. Pageant will bring up a file dialog, labelled ‘Select Private Key File’. Find your private key file in this dialog, and press ‘Open’.
Pageant will now load the private key. If the key is protected by a passphrase, Pageant will ask you to type the passphrase. When the key has been loaded, it will appear in the list in the Pageant window.
Now start PuTTY and open an SSH session to a site that accepts your key. PuTTY will notice that Pageant is running, retrieve the key automatically from Pageant, and use it to authenticate. You can now open as many PuTTY sessions as you like without having to type your passphrase again.