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.
(PuTTY can be configured not to try to use Pageant, but it will try by default. See
section 4.21.3
and
section 3.8.3.9
for more
information.)
When you want to shut down Pageant, click the right button on the Pageant icon in the System tray, and select ‘Exit’ from the menu. Closing the Pageant main window does not shut down Pageant.
9.2 The Pageant main window
The Pageant main window appears when you left-click on the Pageant system tray icon, or alternatively right-click and select ‘View Keys’ from the menu. You can use it to keep track of what keys are currently loaded into Pageant, and to add new ones or remove the existing keys.
•
9.2.1 The key list box
•
9.2.2 The ‘Add Key’ button
•
9.2.3 The ‘Remove Key’ button
9.2.1 The key list box
The large list box in the Pageant main window lists the private keys that are currently loaded into Pageant. The list might look something like this:
ssh1 1024 22:c3:68:3b:09:41:36:c3:39:83:91:ae:71:b2:0f:04 k1
ssh-rsa 1023 74:63:08:82:95:75:e1:7c:33:31:bb:cb:00:c0:89:8b k2
For each key, the list box will tell you:
•The type of the key. Currently, this can be ssh1 (an RSA key for use with the SSH-1 protocol), ssh-rsa (an RSA key for use with the SSH-2 protocol), or ssh-dss (a DSA key for use with the SSH-2 protocol).
•The size (in bits) of the key.
•The fingerprint for the public key. This should be the same fingerprint given by PuTTYgen, and (hopefully) also the same fingerprint shown by remote utilities such as ssh-keygen when applied to your authorized_keys file.
•The comment attached to the key.
9.2.2 The ‘Add Key’ button
To add a key to Pageant by reading it out of a local disk file, press the ‘Add Key’ button in the Pageant main window, or alternatively right-click on the Pageant icon in the system tray and select ‘Add Key’ from there.
Pageant will bring up a file dialog, labelled ‘Select Private Key File’. Find your private key file in this dialog, and press ‘Open’. If you want to add more than one key at once, you can select multiple files using Shift-click (to select several adjacent files) or Ctrl-click (to select non-adjacent files).
Pageant will now load the private key(s). If a key is protected by a passphrase, Pageant will ask you to type the passphrase.
(This is not the only way to add a private key to Pageant. You can also add one from a remote system by using agent forwarding; see
section 9.4
for details.)
9.2.3 The ‘Remove Key’ button
If you need to remove a key from Pageant, select that key in the list box, and press the ‘Remove Key’ button. Pageant will remove the key from its memory.
You can apply this to keys you added using the ‘Add Key’ button, or to keys you added remotely using agent forwarding (see
section 9.4
); it makes no difference.
9.3 The Pageant command line