可以从以下几个方面检查
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
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
-----------------
blog.csdn.net/beiigang