TCP/IP Remote Utilities

Previous Topic Next Topic

Rhosts File

The Rhosts file specifies which remote computer or users can access a local account using rsh or rcp commands. This file (or a file called hosts.equiv) is required on the remote computer for access to a remote computer using these commands. Rsh and rcp both transmit the local user name to the remote computer. The remote computer uses this name plus the IP address (usually resolved to a host name) or the requesting computer to determine whether to grant access. There is no provision for specifying a password to access an account using these commands.

If the user is logged on to a Windows 2000 Server domain, the 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 user name is required as part of the RSH protocol, the command fails if the user name cannot be obtained.

The Rhosts file is a text file where each line is an entry. An entry consists of the local host name, the local user name, and any comments about the entry or a local host name and any comments about the entry. Entries are separated by a tab or space, and comments begin with a number sign (#), for example:

Computer5   marie   #This computer is in room 41A.

Computer7           #This computer is in room 42.


This Rhosts file must be in the user's home directory on the remote computer.

Additionally, have your host name added to the remote computer's /Etc/Hosts file. (Normally a DNS name server is used instead of the Hosts file.)

For more information about a remote computer's specific implementation of the Rhosts file, see the remote computer's documentation.

© 1985-2000 Microsoft Corporation. All rights reserved.