Wednesday, January 07, 2009

Pageant with your SSH Private Key added on Windows Startup

On Linux, I use Keychain to cache my private SSH key and passphrase so that I don't need to keep entering it when I access remote servers. On windows, the only real tool for that is Pageant which comes with Putty.

A problem that I've been having for a while now is that I find myself having to start up pageant and adding my keys everytime I log in to windows.

I found this solution on the net but unfortunately I don't have the resource bookmarked so who ever reads this and knows the original author, I would love to know and post a link to the site.

The solution was to create a shortcut to Pageant in your Startup folder and to modify the "Target Property" and feed putty the key you want to add when it loads up.



So here are the steps :
  1. Click Start, then click All Programs
  2. Right click on the PuttY menu item and then choose Explore from the context menu
  3. This will open a window with the contents of the PuttY menu
  4. Once again, do a right click but this time in the Startup menu item after clicking All Programs, then choose Explore
  5. Copy the Pageant shortcut from the first window that appeared to the window with the Startup folder
  6. Right click on the shortcut in the Startup folder and change the Target field to look like
    "C:\Program Files\PuTTY\pageant.exe" "C:\My Documents\private.ppk"
  7. The first part of the above line with pageant.exe should already be in the target field, what you need to do is add the location of the private key you generated using PuttyGen.
So now, every time you login to windows, Pageant will automatically startup and add your key. It will also challenge you to enter the pass phrase on log in.

1 comment:

  1. You don't recall where you found it on the net? Actually you found it in the pageant help file.

    ReplyDelete