Registered user access using Windows


This document describes the steps you have to take to access the TOL-project CVS using a registered account instead of anonymous.

The steps described below make use of PuTTY tools, distributed through the MIT Open source license, similar to BSD. You can download all the neccesary tools from the PuTTY web page. Every tool mentioned in this document must be included in your PATH. That includes cvs and all PuTTY tools.

Of course you can use any ssh implementation other than PuTTY. You can download the Windows version of openSSH from the openSSH web page. Keep in mind that the steps described below use PuTTY tools, and will not work with other implementations.

1. Key generation

The first step consists in creating the public and private keys. First of all you must create a user directory under which the .ssh directory will store those keys and the repository will be downloaded.
Open a shell and type:

cd
md users
cd users
md userName
cd userName
md .ssh
cd .ssh

Now you need to execute the PuTTYGEN program that comes with the PuTTY tools. Firs of all, you need to change the key type to generate below to SSH2 DSA. After that, press the Generate button and move the mouse over the window to generate your keys. Once it is finished, you will be shown the generated key in ASCII format, in the "Public key for pasting into OpenSSH authorized_keys file" box.

puttykeygen.png

Now copy the contents of that box to a file named id_dsa.pub under the .ssh directory. Write down the same pass phrase in the "Key passphrase" and "Confirm passphrase" boxes, make sure to remember this pass phrase for it will be asked to you every time you want to access the cvs. As always, use a hard-to-hack pass phrase, not using existing words, and mixing up some characters like a semicolon, etc.
When you are done with this, press the Save private key button. This will save the private key in the /users/userName/.ssh/id_dsa.ppk file.

The generated private key (id_dsa.ppk) must NOT be moved to any other directory. The public key, however, has to be sent to the mail address 'devel' at 'tol-project.org'.

2. CVS_RSH environment variable

The next step you need to take is creating the CVS_RSH environment variable. It must have assigned the value of the plink utility that comes with PuTTY.

This environment variable must exist every time you start Windows. To achieve this using Windows 9X/Me, use the autoexec.bat file. For Windows 2000/XP go to: "My Computer" -> "System Properties" -> "Advanced" -> "Environment Variables" -> "New" -> "User variables for yourUser".

For instance, if you have installed PuTTY under the directory c:/usr/local/lib, then the CVS_RSH variable should be created:

set CVS_RSH=c:/usr/local/bin/PLINK

3. Using plink to store the server's public key.

At this point, it is necessary to store the server's public key in a file. Otherwise, every time you tried to access the cvs, plink would ask for confirmation to store the key, and the operation would fail.

plink -v -a -i C:/users/alias/.ssh/id_dsa.ppk alias@host

Being alias@host, your user name followed by the name of the host, i.e: if the user alias you will use was 'mortadelo', alias@host should be mortadelo@cvs.tol-project.org

After the command, answer y and keep on reading...

4. Using PAGEANT to automatize the authentication process

If you want to automatize the process of authenticating yourself against the Tol-Project server, so that you don't have to write down your passphrase every time you execute a cvs command, use the PAGEANT utility that comes with PuTTY.

Of course, you can create a link against it in your "Start" -> "Programs" -> "Start" menu. A new icon is shown on the lower-right zone of your task bar: "Pageant (Putty authentication agent)".

Now right-click and select the "Add Key" option. Select the private key file you created before in: /users/yourUser/.ssh/id_dsa.ppk. Now type in your pass phrase that will be associated with every session you open.

And you are done! Now you can use all cvs commands normally:

cd /users/yourUser
md cvs
cd cvs
cvs -d :ext:yourUser@cvs.tol-project.org:/home/cvsroot/tolp co proyecto

Now you can download all tol-project's CVS projects. Take a look in the Small CVS User Guide so that you can learn all commit rules, as well as learn or remembering basic notions on CVS.

You can also consult the excellent documentation about CVS that is mantained in the Ximbiot CVS Manual.