I am trying to setup Cloud9 for an existing EC2 instance:

enter image description here

it gives me a public ssh key to use, but if I put that public SSH key in ~/.ssh/authorized_keys I still can't connect, it says:

AWS Cloud9 couldn't connect to SSH server ubuntu@ec2-xx-8-xxx-98.us-west-1.compute.amazonaws.com.

But I know ssh is available as I can ssh in manually using this command:

ssh -Y ubuntu@ec2-xx-8-xxx-98.us-west-1.compute.amazonaws.com -i ~/my_pem_files/test.pem

so is there a way to ssh in with pem files or just the public ssh key?

  • if someone could tag this with aws-cloud9 that might be nice – Alexander Mills Jun 3 at 22:11
  • Do your server's firewall logs and/or sshd logs report anything about the incoming connections from Cloud9? Do the EC2 security settings allow connections from any address? – grawity Jun 4 at 5:23

Just allow the IP ranges(that Cloud9 uses to talk to your EC2 instance) in the security group of your instance. It is as simple as that. Here is the link to the official documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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