求助ssh:connect to host xxxx port 22:Connection timed out
答案:2 悬赏:80 手机版
解决时间 2021-01-23 21:33
- 提问者网友:黑米和小志
- 2021-01-23 08:41
求助ssh:connect to host xxxx port 22:Connection timed out
最佳答案
- 五星知识达人网友:末日狂欢
- 2021-01-23 09:26
可以从以下几个方面检查
1 vi /etc/ssh/sshd_config:
然后将这两项的注释号去掉
Port 22
Protocol 2
2 检查sshd服务
sudo service ssh status.
3 检查名字是否一致
/etc/hostname, and /etc/hosts.
4 检查防火墙.
sudo service ufw status
5 查看tcp端口22
zhaoxiaowei@beigang:~$ netstat -nat | grep :22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 52 IPADDR.197 :22 221.123.129.155:54465 ESTABLISHED
tcp 0 0 IPADDR.197 :22 221.123.129.155:1259 ESTABLISHED
tcp 0 0 IPADDR.197:22 192.126.120.8:54340 ESTABLISHED
tcp 0 0 IPADDR .61.197:22 221.123.129.155:54109 ESTABLISHED
tcp 0 0 IPADDR .61.197:22 221.123.129.155:53899 ESTABLISHED
tcp6 0 0 :::22 :::*
LISTEN
1 vi /etc/ssh/sshd_config:
然后将这两项的注释号去掉
Port 22
Protocol 2
2 检查sshd服务
sudo service ssh status.
3 检查名字是否一致
/etc/hostname, and /etc/hosts.
4 检查防火墙.
sudo service ufw status
5 查看tcp端口22
zhaoxiaowei@beigang:~$ netstat -nat | grep :22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 52 IPADDR.197 :22 221.123.129.155:54465 ESTABLISHED
tcp 0 0 IPADDR.197 :22 221.123.129.155:1259 ESTABLISHED
tcp 0 0 IPADDR.197:22 192.126.120.8:54340 ESTABLISHED
tcp 0 0 IPADDR .61.197:22 221.123.129.155:54109 ESTABLISHED
tcp 0 0 IPADDR .61.197:22 221.123.129.155:53899 ESTABLISHED
tcp6 0 0 :::22 :::*
LISTEN
全部回答
- 1楼网友:胯下狙击手
- 2021-01-23 10:57
ssh:connect to host xxxx port 22:connection timed out,解决网友所有的提问 首页» 求助ssh:connect to host xxxx port 22:connection timed out 用户提出的问题 求助ssh:conn.
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯