CVS may use the ‘ssh’ protocol to perform
these operations, so the remote user host needs to have
a either an agent like
ssh-agent to hold
credentials or a .shosts file which grants
access to the local user. Note that the program that
CVS uses for this purpose may be specified using
the --with-ssh flag to configure.
CVS uses the ‘rsh’ protocol to perform these operations, so the remote user host needs to have a .rhosts file which grants access to the local user. Note that the program that CVS uses for this purpose may be specified using the --with-rsh flag to configure.
For example, suppose you are the user ‘mozart’ on the local machine ‘toe.example.com’, and the server machine is ‘faun.example.org’. On faun, put the following line into the file .rhosts in ‘bach’’s home directory:
Then test that ‘rsh’ is working with
rsh -l bach faun.example.org 'echo $PATH'
To test that ‘ssh’ is working use
ssh -l bach faun.example.org 'echo $PATH'
Next you have to make sure that
rsh will be able
to find the server. Make sure that the path which
rsh printed in the above example includes the
directory containing a program named
is the server. You need to set the path in
.bashrc, .cshrc, etc., not .login
or .profile. Alternately, you can set the
CVS_SERVER on the client
machine to the filename of the server you want to use,
for example /usr/local/bin/cvs-1.6.
There is no need to edit inetd.conf or start a CVS server daemon.
There are three access methods that you use in
for rsh or ssh.
:server: specifies an internal rsh
client, which is supported only by some CVS ports.
:extssh: specifies an external ssh program. By
default this is
ssh (unless otherwise specified
by the --with-ssh flag to configure) but you may set the
CVS_SSH environment variable to invoke another
program or wrapper script.
:ext: specifies an external rsh program. By
default this is
rsh (unless otherwise specified
by the --with-rsh flag to configure) but you may set the
CVS_RSH environment variable to invoke another
program which can access the remote server (for
remsh on HP-UX 9 because
something different). It must be a program which can
transmit data to and from the server without modifying
it; for example the Windows NT
rsh is not
suitable since it by default translates between CRLF
and LF. The OS/2 CVS port has a hack to pass ‘-b’
rsh to get around this, but since this could
potentially cause problems for programs other than the
rsh, it may change in the future. If
SSH or some other rsh
replacement, the instructions in the rest of this
section concerning .rhosts and so on are likely
to be inapplicable; consult the documentation for your rsh
Continuing our example, supposing you want to access the module foo in the repository /usr/local/cvsroot/, on machine faun.example.org, you are ready to go:
cvs -d :ext:firstname.lastname@example.org:/usr/local/cvsroot checkout foo
(The bach@ can be omitted if the username is the same on both the local and remote hosts.)