Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 [email protected]

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

like image 669
user633268 Avatar asked Apr 26 '11 23:04

user633268


1 Answers

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

ssh -i ~/.ssh/ServerKey.pem -v [email protected]

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

like image 73
Alpha01 Avatar answered Sep 22 '22 02:09

Alpha01