Using cvs via ssh instead of rsh is easy, but there is some initial setup effort. We will discuss setup on the client end separately from the server end, after some general issues.
Authentication using ssh can be setup two ways.
So using an authorized_keys file with one key per user is recommended, and this is what is described below.
ssh -V
ssh-keygen -t rsa1It will ask you for a passphrase to keep your private key encrypted. Do not use your system password, etc. for this passphrase, rather pick a nice long phrase, but one you can remember. You can change it later with
ssh-keygen -p
This will create $HOME/.ssh/identity and $HOME/.ssh/identity.pub, which are your private and public keys, respectively. You should copy these key files (or even your whole .ssh directory) to whatever computer accounts you have, so that you can establish your key authentication from that account.
Cygwin/NT users unfortunately currently must have a key with an empty passphrase (until certain Cygwin bugs are either fixed or worked around). They should use a separate key for their NT accounts than their others, and use directory/file permissions to keep the key file as safe as possible.
CVS_RSH=ssh
export CVS_RSH
if [ x$SSH_AUTH_SOCK = x ]
then
echo Doing ssh stuff...
eval `ssh-agent`
ssh-add
fi
and this to your $HOME/.login
setenv CVS_RSH ssh
if ( ! $?SSH_AUTH_SOCK ) then
echo Doing ssh stuff...
eval `ssh-agent -c`
ssh-add
endif
Finally, you may need, in your $HOME/.ssh/config file:
Host cdcvs.fnal.gov ForwardAgent trueTo make sure your ssh-agent connection is forwarded to cdcvs. Cygwin/NT users should instead set:
CVS_RSH=ssh-cvsin their $HOME/.bashrc and make sure that their CVSROOT starts with :ext:.
In any case, after adding these to your .login, .profile or .bashrc as appropriate, users should source the file, or log out and log back in.
Send it as an email attachment, so the very long text line doesn't get broken up at the wrong places.
$ upd install cvsh -G -c
$ setup cvsh
$ cp $CVSH_DIR/bin/cvsh /path/to/cvs/account/login/shell