Ssh:connect to host IPAddr Port 22:connection timed out on Ubuntu

Source: Internet
Author: User
Tags ssh

You can check it in the following ways

1 Vi/etc/ssh/sshd_config:
Then remove the annotation numbers from these two items
Port 22
Protocol 2

2

Check the SSHD service

sudo service SSH status.

3

Check if the name is 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 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:: £ º::*

LISTEN




-----------------
Reprint please the Source:
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.