简体   繁体   中英

PuTTy Connection timed out for EC2

I created Ubuntu instance in EC2. And worked fine so far.

But somehow I can't connect to the server by PuTTy anymore and I get Network error: Connection timed out .

  1. The instance is running in the console.
  2. CPU uses just 2%.
  3. InBound Setting seems no problem. SSH with 22 port.
  4. Tried with the IP address and DNS.
  5. restarted the instance and Tried.
  6. Stopped and tried with different IP address.
  7. Instance connection is fine.

This is the screenshot:

在此输入图像描述

This is inbound rule:

在此输入图像描述

How can I solve this problem?

A Connection timeout is a sign that your computer is unable reach the remote computer. Such an error normally takes some time before it fails.

If, instead, the remote computer rejected the connection, the error would appear immediately and the message would be Permission denied .

Things to check:

  • The Security Group on the EC2 instance needs to allow inbound SSH (port 22) access either from the whole internet ( 0.0.0.0/0 ) or, preferably, from a smaller CIDR range that includes your computer (eg choosing "My IP" in the console). This is typically the cause of the issue 80% of the time.
  • The instance needs to be in a Public Subnet , which means the subnet is connected to an Internet Gateway.
  • Your network must allow an outbound SSH connection to AWS. Some corporate networks might block this.
  • There are some other potential causes, but most of the time the cause is one of the above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM