Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

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.

1 Answer

0 votes
by (18.2k points)

Make sure you have configured the security group correctly. You should have a rule for port 22.

You can refer the following link for more information:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...