To make public key authentication more convenient , the developers of PuTTY created Pageant.
Pageant is a program included with PuTTY that will keep your decrypted private keys in memory so you only have to enter your passphrase once rather than every time you authenticate to a server using public key authentication.
While this will make your day-to-day use more convenient, please keep in mind that it also poses a slight risk, since other applications (including viruses) might be able to access these decrypted keys in memory.
To use Pageant:
If the passphrase you entered was incorrect, you will be re-prompted.
Now we should verify that the key is loaded into Pageant:
You should see the key that you loaded into Pageant listed in this window. If not, you should attempt to load your key into Pageant again.
Now that we have verified that our key is loaded into Pageant, we can attempt to log in to a remote machine automatically:
Second, if you have a session already saved for the server to which you wish to connect, you can right click on the icon for Pageant located in the system tray. There is an option in the menu labeled Saved Sessions which will open up to a listing of all your saved sessions. You can select the desired session from that listing and PuTTY will open and try to connect to the remote server you selected.
Finally, if you do not have a session already saved, you can right click on the icon for Pageant in the system tray and select New Session from the menu. This will launch PuTTY into the configuration screen.
login as: sshuser
Authenticating with public key "firstname.lastname@example.org" from agent Last login: Wed Jan 22 11:20:43 2003 from 192.168.1.10 [email@example.com]$
When you were logging in to the remote server, PuTTY saw that Pageant was running and asked Pageant for the key to the remote server. Since the key for the remote server was loaded into Pageant and had already been decrypted, PuTTY was able to use the key to log in to the remote server.
If Pageant is already running in the background, the command line tools that come with PuTTY will automatically detect this and will authenticate with Pageant. An example of PSCP copying a file to a remote server is shown below. The “v verbose option has been added to see PSCP communicate with Pageant:
C:>pscp --v test.txt firstname.lastname@example.org:. Looking up host "server.example.com" Connecting to 192.168.1.10 port 22 Server version: SSH-2.0-OpenSSH_3.1p1 We believe remote version has SSH2 RSA padding bug We claim version: SSH-2.0-PuTTY-Release-0.53b Using SSH protocol version 2 Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange Host key fingerprint is: ssh-rsa 1024 41:61:b5:ab:c5:c5:01:46:ac:ef:a1:28:54:c0:1c:53 Using username "sshuser". Pageant is running. Requesting keys. Pageant has 1 SSH2 keys Trying Pageant key #0 Authenticating with public key "email@example.com" from agent Sending Pageant's response Access granted Opened channel for session Started a shell/command Connected to server.example.com Sending file test.txt, size=1477 test.txt 1 kB 1.4 kB/s ETA: 00:00:00 100% Sent EOF message Server sent command exit status 0 C:>
SECTION I - Obtaining, Compiling and Installing OpenSSH
SECTION II - How to Use OpenSSH Clients for Unix-to-Unix Connectivity
SECTION III - How To Use PuTTY/WinSCP For PC-To-Unix Connectivity
SECTION IV - Using Public Key Authentication
SECTION V - Troubleshooting SSH Connections
SECTION VI - Advanced SSH Topics
Appendix - Sample sshd_config File