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

x
  • 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 192.168.1.76 -l shashi /bin/ls
permission denied.


Please help me out..



0
expertblr
Asked:
expertblr
  • 2
  • 2
1 Solution
 
leisnerCommented:
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:
http://www.daemon-systems.org/man/rhosts.5.html

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

0
 
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?
0
 
leisnerCommented:
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....
0
 
expertblrAuthor Commented:
Hi leisner,

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


Thanks,
0

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