Setup Remote Shell access (RSH) on CentOS 6 / RHEL 6
The Remote Shell is a command line client program that can execute the command as another user, and an another computer over the network. The rsh is a client that connects rshd server daemon, rhsd server daemon runs on tcp port no 514. Rshd does not support encryption so it is very in secure to use on the production environment, because it transfers the password plainly. Now a days rsh replaced by SSH.
Some time you might require to configure for special requirement, you can follow the simple guide to setup.
Install rsh and rshd using yum command, here is the yum configuration guide.
Edit the configuration file to enable rshd server daemon.
vi /etc/xinetd.d/rshservice shell{socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
disable = no
Restart the server daemon.
.rhosts file must be modified to include the names of the remote workstations, file should be under the home directory of the user who’s account is going to be used to execute the commands over a network. If the root account is going to be used to start the web server over a network, file should be under home directory of root user.
vi ~/.rhosts
localhost
server1.external.com
server2.external.com
Any user from the above systems can execute the command as root.
Now run a command from any one of the external machine listed above, for example check uptime status from external machine. host_name refers to your rshd server.