Ssh: connect to host IPADDR port 22: Connection timed out on ubuntu, ipaddrubuntu

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.