This project has retired. For details please refer to its Attic page.
CVS through SSH (v0.10-dev)
Apache Software Foundation > Apache Forrest
Font size:      

CVS through SSH

This is documentation for development version v0.10-dev (More)
This How-To describes the steps necessary to configure an SSH enabled CVS connection. It is recommended to configure an SSH enabled CVS connection to work with Apache code repositories.

Intended audience

This How-to is aimed at developers who have been granted committer access to CVS repositories for particular projects.


Using SSH to access CVS repositories is recommended for security reasons. By configuring CVS to work with remote repository using private/public SSH keys you'll be able to run CVS commands without a need to enter your password every time you need access to CVS through SSH.


  • Account on the local machine.
  • Commiter access to the project(s). This also imply having account on the CVS host machine.
  • Cygwin - a Unix environment for Windows systems. You can get it here. Not required for Linux/*nix users.
  • A CVS GUI application (for Windows users only), e.g. WinCVS. It is not required, but can be very useful.
If you are behind a firewall check that you can communicate through the 22 port. For anonymous access you will need 2401 one.


How to proceed.


Secure Shell. See OpenSSH
Concurrent Version System See CVS Home Page
$ represents local, % remote machine.

Setting up domain users

This step is necessary only for Windows users. Linux users can happily skip this section and pass to Setting up SSH access section

If you are a domain user then you should be added to Cygwin users list (See [cygwin-dir]/etc/passwd).

  • Start Cygwin, then enter following commands:
$ whoami
$ mkgroup -d > /etc/group
$ mkpasswd -d | grep 'userxxx' >> /etc/passwd
$ exit
Replace 'userxxx' by your account name
  • Start Cygwin/shell again and check that everything's Ok:
$ whoami

Setting up SSH access

Start Cygwin/shell, then enter:

$ ssh-user-config
  Shall I create an SSH1 RSA identity file for you? (yes/no) no
  Shall I create an SSH2 RSA identity file for you? (yes/no)  (yes/no) no
  Shall I create an SSH2 DSA identity file for you? (yes/no)  (yes/no) yes
  Generating /home/userxxx/.ssh/id_dsa
  Enter passphrase (empty for no passphrase):
  Enter same passphrase again:
  Do you want to use this identity to login to this machine? (yes/no) yes
  Adding to /home/userxxx/.ssh/authorized_keys2
  Configuration finished. Have fun!

Now you have configured SSH on your machine. Next you have to setup access to the CVS machine.

Having an empty passphrase isn't recommended for security reasons. See ssh-agent documentation on how to configure automatic passphrase retaining.

Setting up passphrase access

Perform the following:

$ scp ~/.ssh/
$ ssh -l userxxx -L 2401:localhost:2401
% mkdir ~/.ssh
% chmod 700 ~/.ssh
% cat ~/ >> ~/.ssh/authorized_keys2
% rm ~/
% chmod 600 ~/.ssh/*
% exit            
Note, that the account name on CVS machine can differ from your local account name.

Check that your configuration is correct:

$ ssh
If this command doesn't work then it can mean that you have an old version of SSH. In this case try ssh -l userxxx Run ssh --help to get all available options.

If now you are logged in to the to the CVS machine without entering the password then everything's Ok.

Getting the project from CVS

Now you are ready to get a project from CVS using SSH connection.

E.g. how it is done using Cygwin/shell

$ export CVS_RSH=/bin/ssh
$ cvs -d co xml-cocoon2            

How to setup WinCVS

  • Add ssh.exe directory to your system PATH environment variable. Say:
    C:\>set PATH=%PATH%;C:\cygwin\bin
  • Add CVS_RSH=ssh environment variable

Start WinCVS, then:

  • From the main menu select Admin
  • Then select Preferences
  • In the dialog that comes up:
    Set the CVSROOT to
  • Set the Authentication to SSH Server
  • Click Ok


You can find more on CVS, SSH and WinCVS here: