开发者

SSH connect to EC2 instance of natty operation timeout

开发者 https://www.devze.com 2023-03-04 06:14 出处:网络
Novice has been trying to ssh into ec2 for 5 hrs straight.Could they make anymore unfriendly to newbies? Trying 4-5 different tutorials to no avail. I\'ve saved cert and pk in

Novice has been trying to ssh into ec2 for 5 hrs straight. Could they make anymore unfriendly to newbies? Trying 4-5 different tutorials to no avail. I've saved cert and pk in .ec2 folder and keypair in .ssh folder. Too many variables here (port authorize needed?, ubuntu uni/multiverse needed?, syntax issue?). Any ideas guys?

ssh -v -v -i *****.pem ubuntu@ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Con开发者_运维技巧necting to ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com [XX.XX.XX.XX] port 22.
debug1: connect to address XX-XX-XX-XX port 22: Operation timed out
ssh: connect to host ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com port 22: Operation timed out


do you have the port opened in your security group ? - if not allow port 22 for the ip's from where you want to connect.


As Paul says, the default security group blocks ssh. You can enable it under "Security & Groups".

SSH connect to EC2 instance of natty operation timeout

Also, this information is listed in the Amazon documentation at http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/running-an-instance.html


As deanpcmad said:

If you have setup an elastic IP, you need to connect via SSH to that new IP, not the public DNS.

So connect to:

ssh -i ~/.ec2/***.pem -v ubuntu@YOUR_ELASTIC_IP


I had the same problem and The Dean Perry's answer worked for me.If you setup an elastic IP, you need to connect via SSH to that new IP, not the public DNS.

0

精彩评论

暂无评论...
验证码 换一张
取 消