[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4380
  • Last Modified:

Linux : rsh Permission denied error

Hi Experts,

                   I'm trying to do rsh on my machime 'A' from machine 'B'.  I do not have any  firewall on machine  'A' and also port 514 is open.

when I try to do the rsh I'm getting permission denied.
 # rsh -l shashi /bin/ls
permission denied.

Please help me out..

  • 2
  • 2
1 Solution
You need to edit the ~/.rhosts file on the rmote machine.

You may also set it globally in /etc/hosts.equiv.

There is supposed to be a man page rhosts(5) but I don't have it on fedora3 it seems...
Here's something to get you started:

.rhosts also cannot be r/w by anyone except you.

expertblrAuthor Commented:

I created the ~/.rhosts file  and then tried to do the rsh. But, still I'm getting permission denied......

I just added my machines IP address in .rhosts file of the remote machine. Is  there any syntax to follow for adding the Ip in the .rhosts file?
no, is  it rw-- --- ---?

I've found there are a number of "things"  that have to be
working right to get this working...

I assume you have the same user names on both machines
(you can configure so one user on another machine can get access to your account).

Also try:
    rsh remote pwd   (to show pwd)
    rsh remote          (to login)

If the local machine also supports rsh, you can also do
it the other way and try it the other way.

To understand what is wrong, I often found it helpful to sniff the packets with ethereal -- you can also do things like
    rsh localhost
(which is really rlogin)

the rtools are very handy in a permissive environment....
expertblrAuthor Commented:
Hi leisner,

     It started working. the problem was rlogin was not enabled....enabled it now.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now