Not able to connect to EC2 instance

I have created an EC2 instance with proper inbound rules but still, I'm not able to connect to an EC2 instance using terminal or EC2 instance connect.

Security group inbound rules:

security group inbound rules

Terminal screenshot:

terminal screenshot

EC2 instance connect screenshot:

ec2 instance connect screenshot

Upvotes: 0

Views: 269

Answers (2)

Dr. Selva Mary G
Dr. Selva Mary G

Reputation: 688

I faced a similar issue before and found that connectivity problems can have several causes. To troubleshoot this, consider the following step:

Network connectivity: Check your internet connection from the device you're attempting to connect with. Test accessing other websites or services to ensure connectivity is functioning properly. If you're using your office Wi-Fi network, some organizations might have restrictions that prevent connecting to external resources. In such cases, try using a different network, such as a mobile hotspot, to rule out any network-related issues.

Upvotes: 0

John Rotenstein
John Rotenstein

Reputation: 269091

Your Security Group looks good, but "Operation timed out" indicates that there is no communication to the instance.

Things to check:

  • The EC2 instance has been launched in a public subnet (defined as a subnet with a Route Table entry pointing to an Internet Gateway)
  • The Network ACLs are at their default "Allow All" settings (There is generally no need to change NACL settings)
  • The instance is running Linux
  • Your network allows outbound SSH connections (try Home vs Office vs Tethered via your phone)

Upvotes: 1

Related Questions