We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Linux : rsh Permission denied error

expertblr asked
Medium Priority
Last Modified: 2007-11-27

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

Watch Question

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.



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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Hi leisner,

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

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.