This article will guide you through the installation and configuration steps for Windows based SSH Agent (Pageant), which is part of Putty Suite.
The procedure mentioned in this tutorial is tested on:
What is Pageant?
Pageant is a PuTTY authentication agent. It holds private keys in memory that can be used to connect SSH Server. It provide following advantage:
a) We don’t need to re-type passphrase time and again while connecting to server.
b) We don’t need to remember the mapping of key with server.
a) Peagent is part of Putty Installer package which can be downloaded from link.
b) OR it can also be downloaded separately as well from link.
a) Go to Windows-Start -> All Programs -> PuTTY -> Pageant.
b) Pageant Program by default start as an icon of a computer wearing a hat into the System tray.
c) Right-click on Pageant Icon to check it various options.
d) Select “View Keys“, which will open Main Window of Pageant. By default it does not load any key.
e) Add the Private Key by specifying its path.
Note: Private key generated by Puttygen have .ppk extension.
f) If the Private Key contains passphrase then you need to enter it.
g) Following screen would appear, which means your key is successfully loaded.
Now open your Putty session to a server machine that accepts your key. You only need to enter following entry and Putty will automatically load key(s) from Pageant and successfully authenticate with server.
i) Hostname or IP address
ii) SSH User (Under Connections -> Data with option Auto-login username)
Loading Pageant and Keys at System Startup
a) Press Windows Key + R => cmd
b) Type the following command:
copy "%ProgramData%\Microsoft\Windows\Start Menu\Programs\PuTTY\pageant.lnk" "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\" explorer "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\"
c) When Windows Explorer opens up right click on the Pageant icon and click on Properties. In the Target field insert the path to your private key. The Target field should be similar to:
“C:\Program Files\PuTTY\pageant.exe” “C:\Program Files\PuTTY\putty-private.ppk” “C:\Program Files\PuTTY\staging.ppk”.
Save the link by clicking on OK. Test your link by double clicking it.
If you entered the correct path to your private key you will be prompted for your private key’s passphrase.
If it doesn’t work make sure that you typed the filename correctly.
Pageant will now run whenever you logon to your Windows account.