Can't Connect To AWS EC2 Instance via Putty

10,367

So, It was a secuity group issue at the end.

AWS makes you include every IP you want to SSH into your server from in a special "group" of permissions to access the server. Otherwise it blocks you from enetering it. Super-good for protection on production servers, bad when accessing your dev server from cafes in the middle of nowhere.

Some more about Security Groups in the AWS Docs (Only for VPC - that's what I use)

Share:
10,367

Related videos on Youtube

itsalive
Author by

itsalive

Recovering SRE, transforming myself into an Avocado one day at a time.

Updated on September 18, 2022

Comments

  • itsalive
    itsalive over 1 year

    I've got an EC2 instance running on AWS:

    1. It's an Ubuntu linux instance, and up until not long ago I used putty to access it on a regular basis - worked great.
    2. I'm using Pageant to load the .ppk file (converted it from AWS's original .pem file as per the AWS docs).
    3. I'm using these login settings: Putty Login Settings
    4. Checked that my securtiy group for the instance allows SSH access on port 22 from my address - it does indeed.
    5. Checked that my elastic IP did not change - it did not.
    6. Tried to login into the Public DNS instead of the IP - no cigar.
    7. Rebooted the instance and waited 15 minutes while making tea.

    Having said that, I'm getting a "network error: connection timed out" error.

    Putty Fatal Error

    What can cause this?

    • HopelessN00b
      HopelessN00b over 9 years
      Firewall get turned on? SSH server not running? Lots of things can cause this.
    • itsalive
      itsalive over 9 years
      I'd Imagine. But what specifically? Throw me some bones here, I'm kinda dumbfounded.
    • Forest1206
      Forest1206 over 9 years
      Did you check the System Log in the AWS console? From the EC2 Instances screen, click the Action button and then "Instance Settings", "Get System Log". Look for any error there.
    • Forest1206
      Forest1206 over 9 years
      Do you see anything related to OpenSSH? You should at least see a line like this:Starting OpenSSH server [ OK ]
    • itsalive
      itsalive over 9 years
      There's on like that. A couple actually - I rebooted twice since I started the instance.
    • Forest1206
      Forest1206 over 9 years
      What happened between the time it was working and the time it stopped working? Did you make any config change? Installed any update?
    • Amol Chakane
      Amol Chakane about 9 years
      I am facing same issue. There is nothing about SSh in AWS system logs Have you resolved it? How?