Possible reasons for timeout when trying to access EC2 instance

后端 未结 24 1110
没有蜡笔的小新
没有蜡笔的小新 2020-12-04 07:54

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, an

相关标签:
24条回答
  • 2020-12-04 08:50

    Building off @ted.strauss's answer, you can select SSH and MyIP from the drop down menu instead of navigating to a third party site.

    0 讨论(0)
  • 2020-12-04 08:50

    If you've just created a new instance and can't connect to it, I was able to solve the issue by terminating that one and creating a new one. Of course this will only work if it's a new instance and you haven't done any more work on it.

    0 讨论(0)
  • 2020-12-04 08:51

    My issue - I had port 22 open for "My IP" and changed the internet connection and IP address change caused. So had to change it back.

    0 讨论(0)
  • 2020-12-04 08:56

    One more possibility. AWS security groups are setup to work only with specific incoming ip addresses. If your security group is setup in this way you (or the account holder) will need to add your ip address to the security group. Todo this open your AWS dashboard, select security groups, select a security group and click on the inbound tab. Then add your ip as appropriate.

    0 讨论(0)
  • 2020-12-04 08:57

    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".)

    0 讨论(0)
  • 2020-12-04 08:57

    To enable ssh access from the Internet for instances in a VPC subnet do the following:

    • Attach an Internet gateway to your VPC.
    • Ensure that your subnet's route table points to the Internet gateway.
    • Ensure that instances in your subnet have a globally unique IP address (public IPv4 address, Elastic IP address, or IPv6 address).
    • Ensure that your network access control (at VPC Level) and security group rules (at ec2 level) allow the relevant traffic to flow to and from your instance. Ensure your network Public IP address is enabled for both. By default, Network AcL allow all inbound and outbound traffic except explicitly configured otherwise
    0 讨论(0)
提交回复
热议问题