Question: How to completely disable RSH Server, and if necessary, uninstall it?
To disable rsh-server:
1. Verify if rsh-server package is installed:
# rpm -qa | grep rsh-server
2. If above command will return rsh-server package follow below action plan:
# vi /etc/xinetd.d/rlogin
specify there:
disable = yes
3. Remove rsh entry from /etc/securetty file and disable the rsh service to not start after reboot:
# chkconfig rsh off
Above command eg chkconfig does not stop rsh but rsh still runs as chkconfig is used to tell OS to start/stop certain services at run-level boot (start phase).
4. Restart the xinted service:
# service xinetd restart
To completely remove rsh-server package do:
# yum remove rsh-server
Rsh client package eg rsh.rpm is just client package and there is no security flaw inside it – its simply used as client tool to reach out other rsh-server enabled systems.