Trifork Blog

Axon Framework, DDD, Microservices

Making Putty and Tortoise CVS remember your password.

July 16th, 2006 by
|

Every time I do a fresh install of my pc I spend at least 30 minutes figuring out how how to set this up because neither of these programs come with password caching and the workaround is neither obvious nor simple. So I decided to document the process on my blog

1) Downloading the tools

Navigate to http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and download putty.exe, puttygen.exe and pageant.exe, and place them in some folder “c:\program files\putty” would do just nicely

2) Generating the public / private key pair

Fire up puttygen and press generate now generate some randomness by moving the mouse over the blank area. Press save private key, and store the private key to some location on your diskCopy the generated public key to the clipboard located in the text field at the top.

3) installing the public key

Log on to your shell account on the cvs server and create a directory called .ssh if it does not exist allready. In this folder create a file called authorized_keys open it with your favourite text editor (vi, pico, nano). Paste the key puttygen generated into the file. Finally change the permissions of this file to read/write for the owner and no one else by issueing chmod 600 authorized_keys

4) Setting up pageant
Pageant is an SSH authentication agent. It holds your private keys in memory. To have it start automatically at computer startup go to

C:Documents and Settings\\Start MenuPrograms\\Startup

Create a new shortcut to

"C:Program Files\\putty\\pageant.exe" "path to key"

5) Check if it works

Double click the created shortcut, an icon should apear in the system tray. Now fire up putty.exe and connect to the remote host using the username you installed the key for. If all went well putty should log you in without asking you for a password.
I usually choose not to protect my private keys with passphrases mostly out of lazyness. However if you require additional security be sure to protect those.
As an aside did you know that you can specify an auto-login username in putty? You can set it at connection > data > Auto-login username.

One Response

  1. […] Audio, video, disco » Blog Archive » Making Putty and Tortoise CVS remember your password. (tags: putty) […]