开发者

Problems with amazon SSH but not other SSH

why is SSH not working?

I keep getting..

ssh: connect to host ec2-11-11-11-11.compute-1.amazonaws.com port 22: Operation timed out

when trying to connect to my amazon EC2 server, at first i thought it was some sort of firewall but i have no firewall and i can SSH in to my MediaTemple server.

the chmod of my pem is 600. and this is how im trying to ssh..

ssh -i ~/.ssh/ServerKey.pem ubuntu@ec2-11-11-11-11.comp开发者_开发知识库ute-1.amazonaws.com

i have a AMI ID: ami-508c7839 so i seen on a video the user should be ubuntu.

i hope someone can see an error somewhere because i dont have a clue. if it helps to know im on a mac.

thanks in advance


Run your ssh command in verbose mode to see where exactly it's timing out in.

ssh -i ~/.ssh/ServerKey.pem -v ubuntu@ec2-11-11-11-11.compute-1.amazonaws.com

Also, I would advice you to specify the absolute path to your ssh key instead of using the ~ tilde sign. (It will save you a headache if you want to auto connect to your EC2 server from a script/cron).

-Tony


Go to Security Group, and make sure the policy "Port 22 (SSH) source 0.0.0.0/0" is set.


Make sure that you have hit "Apply Rule Changes" in Security Groups tab.


I do not think it is an problem of ssh. I suggest you check the network reahcability.

Try to ssh the ip address directly. Try to debug the dns.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜