SSH 报错:
问题1:No route to host
[root@ng1-mysql-master .ssh]# ssh manager -p1022
ssh: connect to host manager port 30000: No route to host
解决:在/etc/sysconf/iptables 配置文件添加下面语句 打开1022端口远程登录
-A INPUT -s 192.168.1.0/24 -p tcp -m state --state NEW -m tcp --dport 1022 -j ACCEPT
问题2 Authentication failed
[root@ng1-mysql-slave2 .ssh]# ssh -p1022 manager
root@manager's password:
Received disconnect from 192.168.1.5 port 1022:2: Too many authentication failures
Authentication failed.
解决:
查看ssh配置文件里面的root登录。
把配置文件里PermitRootLogin 后边改成yes
PermitRootLogin yes