Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH connect to EC2 instance of natty operation timeout

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 [email protected]
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting 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
like image 316
Bill Avatar asked May 11 '11 09:05

Bill


2 Answers

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.

like image 53
Paul Ma Avatar answered Nov 14 '22 05:11

Paul Ma


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

Enable SSH for the security group

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

like image 28
Tim Swast Avatar answered Nov 14 '22 03:11

Tim Swast