Setup TortoiseCVS to work with OpenSSH

Created: 13 April 2010  Modified:

Originally published on chrislynch.info website.

First step is to generate a keypair using ssh-keygen on Linux:

bash-4.0$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/lynchcs/.ssh/id_rsa): /home/lynchcs/.ssh/christortoise
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/lynchcs/.ssh/christortoise.
Your public key has been saved in /home/lynchcs/.ssh/christortoise.pub.
The key fingerprint is:
40:7b:62:7d:7a:03:f3:8a:f3:0a:f5:4d:76:04:34:07 username@mycomputer
The key's randomart image is:
+--[ RSA 2048]----+
|      . E..      |
|     . + q       |
|      + = +      |
|       = + +     |
|        S o +    |
|         x o .   |
|    . . = x      |
|     o = +       |
|      . o..      |
+-----------------+
bash-4.0$ cd .ssh
bash-4.0$ ls
authorized_keys   christortoise.pub  christortoise known_hosts

Secure copy public key over to server and add to authorized list.

bash-4.0$ scp ./christortoise.pub username@www.mysite.com:/home/username/.ssh
username@www.mysite.com's password: 
stdin: is not a tty
christortoise.pub                                                                           100%  400     0.4KB/s   00:00    
bash-4.0$ ssh username@www.mysite.com
username@www.mysite.com's password: 
Last login: Wed Mar 31 16:19:18 2010 from 78-146-266-288.dhcp.whereever.com
chrilyn6@chrislynch.info [~]# cd .ssh
chrilyn6@chrislynch.info [~/.ssh]# ls
./  ../  authorized_keys  christortoise.pub
chrilyn6@chrislynch.info [~/.ssh]# cat christortoise.pub >> authorized_keys
chrilyn6@chrislynch.info [~/.ssh]# chmod 600 authorized_keys 

Copy the private key over to your windows box and convert to a Putty readable key.

Copy the “christortoise” private key and place it in your TortoiseCVS folder. Download and install puttygen.exe into your TortoiseCVS folder. Run puttygen.exe and load the private openssh key. Click “save private key” and save your key as a putty key. In this case I saved it as “christortoiseputty.ppk”.

Install Putty and create a session

Download and install Putty.exe into your TortoiseCVS directory. Run Putty and set the following configurations:

Create link between TortoiseCVS and server

From a command prompt change to the TortoiseCVS directory. type in “TortoisePlink.exe username@www.mysite.com”. This will create a link between your system and the server. It uses the session you created for putty in the previous step. If you added a passphrase to the key you will also have to install and start pageant.exe first.

Connect to CVS using TortoiseCVS

Create the following TortoiseCVS profile. :ssh:username@www.mysite.com:2401/pathtorepository and enter the module you wish to checkout. You should now be able to checkout your module.

tags: blog - old blog - Unix - Unix
   Memory is Fleeting