[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.9.3 Connecting with rsh

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:

toe.example.com  mozart

Then test that `rsh' is working with

rsh -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 cvs which is the server. You need to set the path in `.bashrc', `.cshrc', etc., not `.login' or `.profile'. Alternately, you can set the environment variable CVS_SERVER on the client machine to the filename of the server you want to use, for example `/usr/local/bin/cvs-1.6'. For the ext and fork methods, you may also specify CVS_SERVER as an option in the CVSROOT so that you may use different servers for different roots. See Remote repositories for more details.

There is no need to edit `inetd.conf' or start a CVS server daemon.

There are two access methods that you use in CVSROOT for rsh. :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 (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 example, remsh on HP-UX 9 because rsh is 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' to rsh to get around this, but since this could potentially cause problems for programs other than the standard rsh, it may change in the future. If you set CVS_RSH to 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 replacement.

You may choose to specify the CVS_RSH option as a method option in the CVSROOT string to allow you to use different connection tools for different roots (see section The connection method). For example, allowing some roots to use CVS_RSH=remsh and some to use CVS_RSH=ssh for the ext method. See also the Remote repositories for more details.

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:bach@faun.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.)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on September, 14 2007 using texi2html 1.76.