(Putty) Pageant autoload private key

If you are remotely connecting to your linux desktop using putty and you want to avoid typing your password then pageant is your answer however pageant has a memory of a gold fish. It cannot remember your private key once you have exited from the application. So to get pageant to remember, here is a little trick.

Lets say your private keys are located at “C:\putty\cert”, create a batch file autoloader.cmd and add the following lines

— start here —

if exist "C:\putty\cert\your-linux1.ppk" (set KEYS="C:\putty\cert\your-linux1.ppk")

if exist "C:\putty\cert\your-linux2.ppk" (set KEYS=%KEYS% "C:\putty\cert\your-linux2.ppk")

if not defined KEYS exit
start /d"c:\putty" pageant.exe %KEYS%

— end here —


One thought on “(Putty) Pageant autoload private key

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s