cancel
Showing results for 
Search instead for 
Did you mean: 

rsh is not working

Sachin Patel
Honored Contributor

rsh is not working

Hi
I have redhat 7.1. on system name master and node1.
I have these two package on master and node1.
rsh-0.17-2.5
rsh-server-0.17-2.5

When I run rsh command it gives me error
"Permisson Denied"

I have move /etc/securetty file. I have move /etc/pim.d/rsh file. I have + in my rhosts file. I have account on both system.

Am I missing something?

Sachin
Is photography a hobby or another way to spend $
5 REPLIES
Kodjo Agbenu
Honored Contributor

Re: rsh is not working

Hello Sachin,

On the client side, make sure that the rsh binary has execute permissions. Moreover, if you are not root user, make sure that you have the proper rights on that binary.
Check the /etc/hosts file or the DNS configuration to make sure that the server name is properly resolved.

On the server side, make sure that the remote shell service is started. On my system running Mandrake 8.0, rsh is started "on-demand" using xinetd. Therefore, my /etc/xinetd.d/rsh file looks like this :

service shell
{
disable = no
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
}

You may note the "disable" option that is set to "no". Restart the eXtended inet daemon after any changes in the file :

/etc/rc.d/init.d/xinetd restart

To check if it is running :

netstat -a | grep shell

Check the /etc/hosts file or the DNS configuration to make sure that the client name is properly resolved.

After doing all of these if it still doesn't work, check the /etc/hosts.allow and /etc/hosts.deny file for security aspects. Try with empty file (security disabled).


Good luck,

Kodjo


Learn and explain...
Sachin Patel
Honored Contributor

Re: rsh is not working

Hi Kodjo,
I have changed rsh file on both system, restart xinetd but no luck. I do not have hosts.allow and hosts.deny file. Name resoultion work through /etc/hosts file. I can ping node from master and vice-versa.

Anymore idea?

Sachin
Is photography a hobby or another way to spend $
Kodjo Agbenu
Honored Contributor

Re: rsh is not working

Hi Sachin,

It seems that your problem is not link to a network probem, however it looks like a permission problem.

On my RedHat 7.0 and Mandrake 8.0, the permissions of /usr/bin/rsh are -rwsr-xr-x.

Therefore, logon as root, change the /usr/bin/rsh permissions as follows, logout root and try again with your normal user ID :

chmod 4755 /usr/bin/rsh
chown root:root /usr/bin/rsh

As you may know, the set userID bit "s" makes the program execute as user root, even for non-root users. Programs having this bit set should be considered as security holes, unless they have been tested and tested and tested again.

Good luck

Kodjo


Good luck
Learn and explain...
Vincenzo Restuccia
Honored Contributor

Re: rsh is not working

Answer: settings of the permission bits of the ~/.rhosts file

My default is : rw-rw-r--

This causes a "permission denied".

The permission bits should be: rw-r--r--
Sachin Patel
Honored Contributor

Re: rsh is not working

Thanks for your reply. My problem is fixed now.
permissions on .rhosts file was wrong.

Sachin
Is photography a hobby or another way to spend $