Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible reasons for timeout when trying to access EC2 instance

I cannot SSH into my instance - Operation timed out. What could be the reasons why, and what can I do to resolve it? Rebooting normally takes a long time to take effect, and might just makes things worst

UPDATE: It is not about permissions - i can log in normally just fine. I suspect it might be because of memory issues

like image 998
meow Avatar asked Sep 26 '22 12:09

meow


People also ask

Why can I not connect to my EC2 instance?

Verify that your instance is ready Check your instance to make sure it is running and has passed its status checks. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Instances, and then select your instance.

Why am I getting a server refused our key error when I try to connect to my EC2 instance using SSH?

The following are some common reasons you might receive this error: You're using the incorrect user name for your AMI when connecting to your EC2 instance. The usual user names are ec2-user, ubuntu, centos, root, or admin. The user trying to access the instance was deleted from the server or the account was locked.

How do you troubleshoot if you Cannot SSH into an AWS instance?

The best way to diagnose an SSH problem is to launch a new instance in the same subnet, using the same security group. If this works, then the problem is related to the original instance. The fact that you are receiving a timeout error indicates that your SSH client has been unable to reach the instance.


1 Answers

I had the same problem, and the solution ended up being adding my local machine's IP to the list of inbound rules in the active security group. In the inbound dialog below, enter 22 in the port range, your local IP/32 in the source field, and leave 'custom tcp rule' in the dropdown.

enter image description here

like image 105
ted.strauss Avatar answered Oct 20 '22 10:10

ted.strauss