简体   繁体   中英

ssh to Ubuntu instance on Amazon EC2

I'm running Ubuntu instance on EC2 and I can't ssh to it. I get the following:

Connection timed out

I don't know how to access it. I used the following:

ssh -i <key>.pem ubuntu@<instance address>

Any ideas?

OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to ec2-54-235-7-137.compute-1.amazonaws.com [54.235.7.137] port 22. debug1: connect to address 54.235.7.137 port 22: Connection timed out ssh: connect to host ec2-54-235-7-137.compute-1.amazonaws.com port 22: Connection timed out

Double check that your instace_address if your public dns, it can change when you rebot.

Check that you have the correct permission set for .pem

Are you behind a proxy? Like a work network? This might require a corkscrew configuration.

Are you able to launch a Amazon Linux, and ssh using

ssh -i <key>.pem ec2-user@<instance_address>

Double check that ubuntu is the correct username for your instance(but to be honest I do think it is), but also try user, and ec2-user

Set your security group to allow 0.0.0.0/0, are you able to get in now? Security group issue if so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM