确认机器是否安装rsh包
[root@host160 ~]# rpm -aq |grep rsh
rsh-0.17-25.3
rsh-server-0.17-25.3
确认是否启动rsh 服务
使用命令setup,查看service是否将[*] rsh 加上*,如果加上*表示可以启动。
/etc/rc.d/init.d/xinetd restart 或者 service xinetd restart
检查是否启动: rsh server 监听和TCP 是514。
[root@host160 ~]# netstat -an |grep 514
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN
配置/etc/hosts文件
[root@host160 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
172.17.61.160 host160
172.17.61.161 host161
修改/etc/securetty文件:
[root@host160 ~]# echo rsh >>/etc/securetty
[root@host160 ~]# echo rcp >>/etc/securetty
[root@host160 ~]# echo rexec >>/etc/securetty
[root@host160 ~]# echo rlogin >>/etc/securetty
如果打算用root作为rsh用户的话:
[root@host160 ~]# cd ~/
echo "172.17.61.161 root" >>.rhosts
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271283/viewspace-983170/ ,如需转载,请注明出处,否则将追究法律责任。