Enabling rsh for Linux
To enable rsh
- To ensure that the rsh and rsh-server packages are installed, type the following command:
# rpm -qa | grep -i rsh
If it is not already in the file, type the following command to append the line "rsh" to the /etc/securetty file:
# echo "rsh" >> /etc/securetty
- Modify /etc/init.d/rsh disable=no.
- In the /etc/pam.d/rsh file, change the "auth" type from "required" to "sufficient":
auth sufficient
- Add the "promiscuous" flag into /etc/pam.d/rsh and /etc/pam.d/rlogin after item "pam_rhosts_auth.so".
- To enable the rsh server, type the following command:
# chkconfig rsh on
- Modify the .rhosts file. Each line of the .rhosts file contains a fully qualified domain name or IP address for each remote system. This file also contains the name of a user having access to the local system. For example, if the root user must remotely access system1 from system2, add an entry for system2.companyname.com to the .rhosts file on system1 by typing the following command:
# echo "system2.companyname.com" >> $HOME/.rhosts