大数据【关于ssh: connect to host master port 22: Connection timed out问题的总结】
2017-10-07 12:34
851 查看
最近在cnetos6.5系统上重新配置了hadoop-2.2.0,在配置集群的ssh无秘钥登录时,经常能碰到ssh: connect to host master port 22: Connection timed out的问题。现在对该问题做一下可能出现的问题的总结和解决办法:
一.IP配置错误。
当出现上述错误时,首先检查网络连通情况,Ping一下远程登录的目标主机,如果ping不通,很有可能是/etc/hosts文件中的IP地址映射出现问题,需要仔细检查名称和IP地址的映射关系。
二.防火墙问题。
当发现IP配置没有错误时,我们需要检查端口是否被防火墙禁用了,使用sudo service iptables status命令查看防火墙状态,如果出现:
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
2 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
3 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
我们可以看到,ssh登陆的默认端口22被禁止了。
我们使用sudo chkconfig iptables off来永久关闭防火墙,如果使用sudo service iptables stop将临时关闭防火墙,会在下一次关机重启后重置,建议使用第一种。
一.IP配置错误。
当出现上述错误时,首先检查网络连通情况,Ping一下远程登录的目标主机,如果ping不通,很有可能是/etc/hosts文件中的IP地址映射出现问题,需要仔细检查名称和IP地址的映射关系。
二.防火墙问题。
当发现IP配置没有错误时,我们需要检查端口是否被防火墙禁用了,使用sudo service iptables status命令查看防火墙状态,如果出现:
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
2 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
3 DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
我们可以看到,ssh登陆的默认端口22被禁止了。
我们使用sudo chkconfig iptables off来永久关闭防火墙,如果使用sudo service iptables stop将临时关闭防火墙,会在下一次关机重启后重置,建议使用第一种。
相关文章推荐
- 关于ssh: connect to host master port 22: Connection timed out问题的总结
- 关于ssh: connect to host master port 22: Connection timed out问题的总结
- 【解决】ssh: connect to host slave port 22: Connection timed out的问题
- 解决ssh: connect to host gitlab.com port 22: Connection timed out
- 2.git 连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- 解决ssh: connect to host 107.21.95.3 port 22: Connection timed out
- Git配置非22端口,解决:ssh: connect to host xxx port 22: Connection timed out fatal: The remote end hung up unexpectedly
- localhost: ssh: connect to host localhost port 22: Connection timed out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- 使用云主机配置互信后ssh: connect to host hadoop port 22: Connection timed out
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- git clone时出现ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- ssh: connect to host github.com port 22: Connection timed out
- connect to host ssh.github.com port 22: Connection timed out解决方法
- 【流水】启动hdfs的报错ssh: connect to host master port 22: Connection timed out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- Git克隆提交出现“ssh: connect to host github.com port 22: Operation timed out fatal”问题
- ubuntu 14.04下scp传输文件出现ssh: connect to host ***port 22: Connection timed out
- ssh: connect to host github.com port 22: Connection timed out