Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is the command I am told to use by clicking connect in the control panel "ssh -i private_key.pem root@instancePublicDNS"

Well that one failed so I wanted to know what happen so I ran "ssh -vvv private_key.pem root@instancePublicDNS"

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007

debug2: ssh_connect: needpriv 0

debug1: Connecting to private_key.pem [...] port 22.

debug1: connect to address ... port 22: Attempt to connect timed out without establishing a connection

ssh: connect to host private_key.pem port 22: Bad file number

Any Ideas? I have searched for the answer on google and serverfault, I found a few possible solutions that did not work.

info about the instance

AMI-ID : ami-688c7801 ( ubuntu 10.10 Server )

share|improve this question
up vote 5 down vote accepted

Configure "Security Groups" to allow ssh:

share|improve this answer
Thank you, this worked! – Mark McCook Feb 20 '11 at 22:33
@Mark if the answer is correct, then confirmed it – ooshro Feb 20 '11 at 22:39
Awesome! Thanks for that! – jonathanconway Jul 13 '11 at 17:09
I think most people forget to apply rules changes. I did. – Jose Adrian Jan 19 '12 at 21:38
Does not work. I already have this in the rules. But after an instance reboot, ssh-ing does not work. – kadaj Mar 21 '13 at 2:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.