USING SSH-AGENT TO CONNECT TO CVS

The agent is run in the user's local PC, laptop, or terminal. It authenticates your pass phrases when running SSH or CVS. Normally when running CVS remotely you are prompted for a pass phrase every time you enter a CVS command. Before you can use the agent, you need to be able to login to an account at the remote site via SSH.


1. Use an encrypted passphrase to login to a remote Linux box from a local Linux box.

If you already have the remote .ssh directory set up and working, skip to part 2.

  • If there is no .ssh directory at the remote site, create one.

  • Open another local Linux terminal window and copy your local keys to your remote .ssh directory.

  • Back in the remote Linux window create the .ssh/authorized_keys file with:


  • 2. Use ssh-agent to automatically login to a remote Linux box from a local Linux box.

    Utility scripts have been written to simplify starting and stopping the ssh-agent. They should be accessible via the PATH variable. You can either run them from the command line or from your login and logout scripts. The following instructions show how to run them via login scripts. You can do things a little differently if you prefer.

  • Verify you can login to the remote account with an encrypted passphrase.
  • If you are prompted for a password and not a passphrase your remote .ssh/ directory is not set up properly. Make sure the public key is in the .ssh/authorized_keys file on the remote Linux box. If the file .ssh/authorized_keys already exists you may need to append .ssh/id_dsa.pub to add you public key.


  • Set up ssh-agent from csh or tcsh.
  • The following example assumes you placed the utility scripts in ${HOME}/bin/. If they are elsewhere then change the edits to reflect the actual location. Edit your login and logout scripts and add the following lines:

  • Set up ssh-agent from sh or bash.
  • Edit your login and logout scripts and add the following lines:

  • Login using the ssh-agent.
  • Start the agent and enter your passphrase. You only need to do this once per session.

    Now when you login to the remote computer or run a CVS command you won't be prompted for your password.

    When you logout the agent process will be killed if it is running. Sometimes it takes several seconds to do this.

    If anyone wants to know how to use ssh-agent on Windows, let me (Brad) know and I'll post instructions.

    Developer Links