How do I use public key authentication over SSH from a Windows client?
Author: Deron Eriksson
Description: This tutorial demonstrates how to use puttygen, putty, and pageant to perform public key authentication using SSH.
Tutorial created using:
Fedora 12
(Continued from page 1) Now, I open PuTTY. My server is located at 192.168.0.41. I enter the IP address and give the 'Session' a name (the same IP address). This data can be saved by clicking Save. ![]() I go to Connection → SSH → Auth. In the "Private key file for authentication", I locate my private key. ![]() I go to Connection → Data and enter my Unix login name in the "Auto-login username" box. ![]() I go back to Session and click Save to save the session data. ![]() Now, time to connect! Click the Open button. ![]() Putty opens an SSH window to the server with the user name "deron" using public key authentication. We need to enter key passphrase that we created in puttygen. After entering the passphrase, we're logged into the server! ![]() If you don't want to have to type your passphrase each time you log in, you can use Pageant (which comes with PuTTY). If you start Pageant, you can right-click on its icon and go to Add Key. ![]() Select your private key. ![]() Then, enter your passphrase. ![]() Now, Pageant is all set up. If Pageant is running and we now try to connect to the server, we no longer need to manually enter our passphrase. ![]() That's it. In this tutorial, we've seen how we can use Puttygen to generate a public/private key pair safeguarded with a passphrase, we've seen how we can use these keys to connect to an SSH server using PuTTY, and we've seen how we can automate the passphrase process using Pageant. |