views:

213

answers:

2

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

+1  A: 

Did you set an appropriate security group for the instance? I.e. one that allows access from your network to port 22 on the instance. (By default all traffic is disallowed.)

Update: Ok, not a security group issue. But does the problem persist if you launch up another instance from the same AMI and try to access that? Maybe this particular EC2 instance just randomly failed somehow – it is only matter of time that something like that happens. (Recommended reading: Architecting for the Cloud: Best Practices (PDF), a paper by Jinesh Varia who is a web services evangelist at Amazon. See especially the section titled "Design for failure and nothing will fail".)

Jonik
Here's the same thing on EC2 FAQ: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1145#08 (Besides `ec2-authorize`, you can use Elasticfox Firefox extension to easily configure the groups.)
Jonik
A: 

Have you looked at the console output from the instance ? You can do this via the AWS console. I've had occasions where the network services on an EC2 instance failed to start correctly, resulting in timed out SSH connections; restarting the instance usually fixed things.

gareth_bowles