Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH connection to ec2 Connection timed out [closed]

I cannot SSH in to my ec2 instance from ubuntu 12.11.

I tried all the methods of ssh by giving key as credentials

I used

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

and I am getting the output as

OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ec2-54-209-148-122.compute-1.amazonaws.com [54.209.148.122] port 22.

debug1: connect to address 54.209.148.122 port 22: Connection timed out
ssh: connect to host ec2-54-209-148-122.compute-1.amazonaws.com port 22: Connection timed out

Thank u,

like image 458
bobbarav Avatar asked Dec 23 '13 08:12

bobbarav


2 Answers

Please make sure that you have configured it on security group for port 22, you can refer it from the following link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html

like image 174
kenshinji Avatar answered Oct 22 '22 10:10

kenshinji


Check for a firewall blocking access to this port or IP. It might be a firewall running on the client machine, the server machine or a network firewall running in the client network.

like image 22
Barak Avatar answered Oct 22 '22 10:10

Barak