Operating System - Linux
1819681 Members
3459 Online
109605 Solutions
New Discussion юеВ

RSH Problem on Linux.... (Permission Denied error)

 
Mangesh Yadav
Occasional Advisor

RSH Problem on Linux.... (Permission Denied error)

Hi All,

I have configured rsh on linux box but i am getting error as Permission denied while doing rsh from other machines.If I place hostname in .rhosts than I am able to rsh.
Can anybody help in resolving this.
===========================
[root@aban root]# rsh -l root lnxr-moca-vm13 ls
Permission denied.
[root@aban root]#
===========================
following are the files which i have changed/configure.

[root@lnxr-moca-vm13 ~]# more .rhosts
+
[root@lnxr-moca-vm13 ~]#
[root@lnxr-moca-vm13 ~]# more /etc/hosts.equiv
+
[root@lnxr-moca-vm13 ~]#


Thanks in Advance.




6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: RSH Problem on Linux.... (Permission Denied error)

Shalom,

If there is a conflict between dns hostname resolution and the .rhosts file this is an expected result.

See that all systems involve resolve all host names the same way. When they do, this problem should go away.

Take a look at /var/log/messages for additional diagnostic information and post snippets to help us help you out.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Philip Gunter
Respected Contributor

Re: RSH Problem on Linux.... (Permission Denied error)

Hi Mangesh,

I'd recommend that to don't use rsh at all. Its a very insecure protocol. You should use ssh which can be used as a complete replacement rsh.

Here is a very good write up of how to configure ssh.
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-openssh-client-config.html

Cheers,
Philip.
Joelmel Roche
Valued Contributor

Re: RSH Problem on Linux.... (Permission Denied error)

If you want to use "+" in /etc/hosts.equiv or .rhosts, you need to set "promiscuous" in /etc/pam.d.

Please refer to following URL, search pam_rhosts_auth in the doc.
http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html

hosts_equiv_rootok - allow the use of /etc/hosts.equiv for superuser. Without this option /etc/hosts.equiv is not consulted for the superuser account.
Justin_99
Valued Contributor

Re: RSH Problem on Linux.... (Permission Denied error)

You might also look at adding rsh/rlogin to the end of /etc/securetty depending on if you need passwordless or not.
Alexander Chuzhoy
Honored Contributor

Re: RSH Problem on Linux.... (Permission Denied error)

Since you're trying to access the other staion as root, in addition to .rhost you must also add the line "rsh" to /etc/securetty file.
Mangesh Yadav
Occasional Advisor

Re: RSH Problem on Linux.... (Permission Denied error)

.