The main difference between these forms of authentication lies in the type of interaction they require from you and the way they are established. If a remote system tries to authenticate you, you will be prompted for a password, unless you set up the /etc/hosts.equiv or .rhosts file. If the network tries to authenticate you, you won't be asked for a password, since the network already knows who you are. The figure below shows a simplified illustration to describe authentication for remote logins.
When the remote system attempts to authenticate you, it relies on information in its local files; specifically if:
Your system name and user name appears in the remote system's /etc/hosts.equiv file, or
Network authentication relies on one of these two methods:
The /etc/hosts.equiv file contains a list of trusted hosts for a remote system, one per line. If a user attempts to log in remotely (using rlogin) from one of the hosts listed in this file, and if the remote system can access the user's password entry, the remote system allows the user to log in without a password.
host1 host2 user_a +@group1 -@group2
If the user name is also mentioned, as in the second entry in the example, then the host is trusted only if the specified user is attempting access.
The /etc/hosts.equiv file presents a security risk. If you maintain a /etc/hosts.equiv file on your system, you should include only trusted hosts in your network. The file should not include any host that belongs to a different network, or any machines that are in public areas. (For example, do not include a host that is located in a terminal room.)
The .rhosts file is the user equivalent of the /etc/hosts.equiv file. It contains a list of host-user combinations, rather than hosts in general. If a host-user combination is listed in this file, the specified user is granted permission to log in remotely from the specified host without having to supply a password.
Users can create .rhosts files in their home directories. Using the .rhosts file is another way to allow trusted access between their own accounts on different systems without using the /etc/hosts.equiv file.
Unfortunately, the .rhosts file presents a major security problem. While the /etc/hosts.equiv file is under the system administrator's control and can be managed effectively, any user can create a .rhosts file granting access to whomever the user chooses without the system administrator's knowledge.
In a situation in which all of the users' home directories are on a single server and only certain people have superuser access on that server, a good way to prevent a user from using a .rhosts file is to create an empty file as superuser in their home directory. You would then change the permissions in this file to 000 so that it would be difficult to change it, even as superuser. This would effectively prevent a user from risking system security by using a .rhosts file irresponsibly. It would not, however, solve anything if the user is able to change the effective path to his or her home directory.
The only secure way to manage .rhosts files is to completely disallow them. See "How to Search for and Remove .rhosts Files" for detailed instructions. As system administrator, you can check the system often for violations of this policy. One possible exception to this policy is for the root account--you might need to have a .rhosts file to perform network backups and other remote services.