Linux : rsh Permission denied error

Posted on 2006-03-25
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..

Question by:expertblr
    LVL 3

    Expert Comment

    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.


    Author Comment


    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?
    LVL 3

    Accepted Solution

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

    Author Comment

    Hi leisner,

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now