Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access denied

Status
Not open for further replies.

sun1350

Technical User
Apr 7, 2000
13
0
0
MY
Visit site
When I enter the command

rsh remote_host ls

it gives me access denied error message.

How could I solve this problem?

Thanks.
 
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...

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top