Ssh: connect to host IPADDR port 22: Connection timed out on ubuntu, ipaddrubuntu
You can check from the following aspects:
1
Vi/etc/ssh/sshd_config:
Remove the comments of the two items.
Port 22
Protocol 2
2
Check sshd service
Sudo service ssh status.
3
Check whether the names are consistent
/Etc/hostname, and/etc/hosts.
4
Check the firewall.
Sudo service ufw status
5
View tcp port 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
-----------------
Please refer to the following source for reprinting:
Blog.csdn.net/beiigang