Categories
How-To Software Technical

Automate your SSH Login using PuTTY

Truth:  day-to-day tasks suck
To automate SSH login, do the following:
1. Run PuTTYgen.
2. Select SSH-2 DSA as the Type of Key to generate.
3. Click generate and move your mouse around to generate randomness.
4. Click “Save Private Key” and save it somewhere on your computer.
5. Copy the entire content inside the box to your clipboard (this is your generated public key).
6. Login to your SSH server.
7. Create the file ~/.ssh/authorized_keys containing the generated public key on a single line.
8. Make this file readable.
9. Then open up PuTTY and navigate to Connection->Data and fill in the auto-login username.
10. Navigate to Connection->SSH->Auth and under Private-key, browse to the file you had saved earlier on your computer.
That’s it!