Skip to main content

10 months ago

EC2 Instance - Can't connect to WebServer through SSH

I can't connect to Webserver using SSH. The Webserver also has Public IP address.

I have followed the troubleshooting guide:
I have checked from from Internet Gateway up to EC2 Instance and its Security Groups settings. 

No blackhole status in the route table.

Is there anything I missed? Thanks!!

Image of amohiuddin
10 months ago
1. Ping the public address first.
2. Did you download the pem key and set the permission correctly and used following command format to connect

 ssh -i "keypair.pem"

Image of mdnawy111
10 months ago
Hello Donny,
I am doing the course and I got stuck in the same place just about 15 mins ago!. I manged to sort it out.

Check your default NACL inbound rules and ensure you are allowing ssh traffic i.e., rule 100. If you are seeing rule 90 to deny the traffic please delete it and try again.

Image of ellmarquez
10 months ago
Hi Donny, I wanted to check in and make sure you had been able to connect. 
Image of forseti
10 months ago
Hi mdnawy111,
Hi  Ell Marquez,

Thanks for the replies!! 
I finally figured out the main issue. It's the firewall used by the company.
So I went back and recreated the EC2 from home and managed to connect without any trouble.

Thanks again You Two!! :) 
Image of ermin
10 months ago
Nice well done and I am glad you got it solved. Hey by the way we have playground servers that allow you to access servers via port 80-443 with ssh so you should be able to connect to them even from your company environment.
Image of forseti
10 months ago
Hi Ermin Kreponic,
Thanks!! I can verified that the labs have been working fine from office computer so far.  

Only the one from AWS free tier account that I created doesn't work (which is okay since I can always go home and exercise).

Thanks again!!!