Setting up CVS access over SSH

How to set up CVS acces to a repository over SSH using a public/private key pair.

SSH access

First, establish the ssh connection by making the public/private key pair and transferring it to the correct location:

$ ssh-keygen -t dsa

$ scp .ssh/ <user>@<remote_server>:.ssh/

$ ssh <remote_server>

$ cd .ssh

$ cat >> authorized_keys2

Now, you should be able to login to the remote server by entering:

$ ssh <remote_server>

CVS settings

Environment variables

Setup the CVS environment variables:

$ export CVS_RSH=’ssh’;

$ export CVSROOT=:ext:username@server:/path/to/repository

Basic commands

Checking out:

$ cvs checkout <modulename>

Adding files:

$ cvs add <filename>


$ cvs commit


$ cvs update

Add a new module:

$ cvs import -m ‘Initial import’ <modulename> <author> <tag>