Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 Network Error : Connection timeout

Tags:

amazon-ec2

I created an EC2 micro instance of Linux and launched it, created a keypair and all the beginning stuff specified in this video:

http://www.youtube.com/watch?v=hJRSti6DsJg

But when I connect to my instance with PUTTY terminal, it will not connect to my EC2 instance.

I have specified the correct instance Public DNS and private key which I created with the PUTTY key generator.

I get this error:

Network Error : Connection timeout
like image 251
Arsalan Avatar asked May 04 '11 09:05

Arsalan


2 Answers

Having successfully connected in the past, I got this error after shutting down my instance and starting it again.

Apparently the Public DNS changes after you shut it down and start it again, so I had to replace the DNS string in PuTTY before it could find my instance to connect with it on port 22.

like image 153
Michael Currie Avatar answered Oct 05 '22 12:10

Michael Currie


You simply need to add an ssh rule for inbound connections to you ec2 instance in the ec2 management console.

  1. Go to ec2 console
  2. Click Instances on Left
  3. Select your instance
  4. In the Description tab, locate Security Groups and click the available group link
  5. Click edit button on Inbound tab
  6. Click Add Rule and select SSH for type, Port Range 22, and Source Anywhere
  7. Connect with putty :)
like image 43
kevin Avatar answered Oct 05 '22 12:10

kevin