Using that format of [tt]rsh[/tt] assumes that you have the same login name on the remote server as you are using on the local server. So, first thing to do is to make sure that is the case.
If it is, then login to the remote server and create a file called ".rhosts" in your home directory. The ".rhosts" file consists of a series of lines in the following format:
[tt]
hostname [username]
[/tt]
The username is optional. If it is left blank, then it means "only a user with the same login name". Cutting and pasting from the man page for "hosts.equiv" (which is a system wide version of ".rhosts":
[tt]
The hostname field normally contains the name of a trusted host from which a remote login can be made, and username represents a single user from that host. However, an entry consisting of a single `+' indicates that all known hosts are to be trusted for all users. A host name must be the official name as listed in the hosts(4) database. This is the first name given in the hosts database entry; hostname aliases are not recognized.
[/tt]
With the .rhosts file, if you specify the username parameter then you are saying that only the named user can run the "r" commands as the current user.
Here's an example to illustrate this. On the host "deathstar" your user name is "darth". On "tatooine" it is "luke". You login to "deathstar" and create the ".rhosts" file in darth's home directory. The file contains a single line: "tatooine luke".
User luke on tatooine can now run "r" commands (rsh, rlogin, etc.) on deathstar as user darth. For example, "rsh deathstar -l darth ls".
Standard security notice
Using .rhosts files, and /etc/hosts.equiv, can be a big security hole. If an account on one server is compromised, then the remote account is also immediately compromised. So, use with care...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.