rsh hostname已经通过测试,但是使用rsh hostname rcmd 来执行命令,未能通过。出现no route to host错误。原因可能有以下三种可能:
网关
本机IP地址配置是否正确
DNS
出现no route to host的大部分原因是网关没有配置正确。
解决方法如下:
使用root登陆,到/etc/selinux下修改config,修改之后的信息如下:
#This file controls the state of SELinux on the system.
#SELINUX= can take one of these three values:
#enforcing - SELinux security policy is enforced.
#permissive - SELinux prints warnings instead of enforcing.
#disabled - SELinux is fully disabled.
SELINUX=disabled //修改点
#SELINUXTYPE= type of policy in use. Possible values are:
#targeted - Only targeted network daemons are protected.
#strict - Full SELinux protection.
SELINUXTYPE=targeted
然后重启rsh,如果还不行,那么重启机器。
注意:在集成环境中所以机器都需要配置。
参考资料
Linux公社.Linux公社[引用时间2017-12-24]