|Version Management with CVS - the CVS manual|
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
RRP £19.95 ($29.95)
2.4.1 Connecting with rsh and ssh
CVS uses the remote shell protocol to perform operations on the server, via the ‘rsh’ or ‘ssh’ commands. The protocol used by ‘ssh’ provides secure authentication and encryption, while the ‘rsh’ command has minimal security and is only suitable for a closed environment.(1) Whatever remote shell command is used, the remote user host needs to have a working login configuration, such as a ‘.rhosts’ or ‘~/.ssh/authorized_keys’ file which grants access to the local user.
For example, suppose you are the user ‘mozart’ on the local machine ‘toe.example.com’, and the server machine is ‘faun’. If you want to connect by ‘rsh’, put the following line into the file ‘.rhosts’ in ‘bach’'s home directory on faun:
Then test that ‘rsh’ is working with
$ rsh -l bach faun 'echo $PATH'
To connect by ‘ssh’, first set up your login credentials (for example, by generating a public key with
ssh-keygen and copying it to the ‘~/.ssh/authorized_keys’ file on the remote host). Then check that the connection is working with
$ ssh -l bach faun 'echo $PATH'
and set the environment variable
ssh as follows:
$ CVS_RSH=ssh $ export CVS_RSH
Next you have to make sure that
ssh will be able
to find the CVS server executable. Make sure that the path which
was printed in the above example includes the
directory containing a program named
is the server. You need to set the path on the remote server 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 two access methods that you use in
:server: specifies an internal rsh
client, which is supported only by some CVS ports.
:ext: specifies an external rsh program. By
default this is
rsh but you may set the
CVS_RSH environment variable to invoke another
program which can access the remote server, such as
ssh as shown above.(2) 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
Continuing our example, supposing you want to access the module ‘foo’ in the repository ‘/usr/local/cvsroot/’, on machine ‘faun’, you are ready to go:
$ cvs -d :ext:bach@faun:/usr/local/cvsroot checkout foo
(The ‘bach@’ can be omitted if the username is the same on both the local and remote hosts.)
2.4.2 Other access methods
In addition to using remote shell commands, there are several ways clients can access a CVS server directly over a TCP connection. These are described in section 17 The CVS server.
|ISBN 0954161718||Version Management with CVS - the CVS manual||See the print edition|