Possible reasons for timeout when trying to access EC2 instance

后端 未结 24 1109
没有蜡笔的小新
没有蜡笔的小新 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:36

    AFTER 2 HOURS I FOUND THIS

    Note That ssh ip 120.138.105.251/32

    • IS NOT aws instance IP ADDRESS

    • It Is not your local ip 127.0.0.1

    • It Is not your local ip localhost

    BUT BUT BUT

    Its Your public ip address of your personal Computer from which you trying to access aws instance

    1. Go to https://www.whatismyip.com/ whatever ip address put in ssh

    IF YOU WANT TO FULLY OPEN SSH TO ALL IP ADDRESS

    THIS IS HOW FULLY ACCESSIBLE ENTRIES LOOK - BASIC RECOMEENDED

    THIS IS WHAT I AM USING IN PRODUCTION

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

    I had the same problem, and the solution was allowing access from anywhere to the list of inbound rules in the active security group. In the inbound dialog, enter 22 in the port range, anywhere in the source field, and select 'ssh' in the dropdown.

    P.S : This might not be the recommended solution as it means this instance can be ssh'ed from any machine, but I could not get it to work with my local IP.

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

    I was working on the instance and it was fine, the very next day when I tried to SSH into my instance it said - Connection timeout.

    I tried to go through this post but nothing worked. So I did -

    On the Edit inbound rules from source column choose MY IP and it will automatically populate your Public IP address in CIDR format (XXX.XXX.XXX.XX/32).

    I tried with the @ted.strauss answer by giving local IP but it did not help in my case. So I choose MY IP and it worked.

    Hope this helps someone!

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

    For me it was the apache server hosted on a t2.micro linux EC2 instance, not the EC2 instance itself.

    I fixed it by doing:

    sudo su

    service httpd restart

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

    I had similar problem, when I was using public Wifi, which didn't have password. Switching the internet connection to a secure connection did solve the problem.

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

    ping the DNS first . If fails then configure your inbound/outbound rules in the launch wizard . configure ALL traffic and ALL protocol and just save with default options . Ping again with your local system and then should work

    0 讨论(0)
提交回复
热议问题