The rcp command does not prompt for passwords; the current or specifed user name must
exist on the remote computer and allow remote command execution via rcp.
The .rhosts File
The .rhosts file specifies which remote system or users can assess a local
account using rsh or rcp. This file (or a HOSTS equivalent) is required for access to a remote system
using these commands. Rsh and rcp both transmit the local username to the remote system. The remote system uses
this name plus the IP address (usually resolved to a computer name) or the
requesting system to determine whether access is granted. There is no provision
for specifying a password to access an account using these commands.
If the user is logged on to a Windows NT Server domain, the primary domain
controller must be available to resolve the currently logged on name, because the
logged on name is not cached on the local computer. Because the username is
required as part of the rsh protocol, the command will fail if the username cannot be obtained.
The .rhosts file is a text file where each line is an entry. An entry consists
of the local computer name, the local user name, and any comments about the
entry. Each entry is separated by a tab or space, and comments begin with a hash
mark (#), for example:
computer5 marie #This computer is in room 31A
The .rhosts file must be in the users /ETC/HOSTS file. This will allow the remote system to authenticate remote
requests for your computer using the Microsoft TCP/IP utilities.
Specifying Computers (Hosts)
Use the computer.user variables to use a user name other than the current user name. If computer.user is specified with source, the .rhosts file on the remote computer must contain an entry for user. For example,
rcp rhino.johnb:file1 buffalo.admin:file2
The .rhosts file on BUFFALO should have an entry for Johnb on RHINO.
If a computer name is supplied as a full domain name containing dots, a user
name must be appended to the computer name, as previously described. This
prevents the last element of the domain name from being interpreted as a user name.
rcp domain-name1.user:johnm domain-name2.user:billr
Remote processing is performed by a command run from the user's logon shell on
most UNIX systems. The user's .profile or .cshrc is executed before parsing filenames, and exported shell variables
may be used (using the escape character or quotation marks) in remote filenames.
If you attempt to copy a number of files to a file rather than a directory,
only the last file is copied. Also, the rcp command cannot copy a file onto itself.
If you logged on the Windows NT computer using a domain other than the local
domain, and the primary domain controller is unavailable, the command will fail
because rcp cannot determine the local user name. The same restriction applies to rsh.
More Information About Rcp