1
votes
$ ssh -vvv -i "AMSKeyPair.pem" [email protected]

OpenSSH_7.4p1, LibreSSL 2.5.0 debug1: Reading configuration data

/etc/ssh/ssh_config debug2: resolving

"ec2-52-43-0-65.us-west-2.compute.amazonaws.com" port 22 debug2:

ssh_connect_direct: needpriv 0 debug1: Connecting to

ec2-52-43-0-65.us-west-2.compute.amazonaws.com [52.43.0.65] port 22.

debug1: connect to address 52.43.0.65 port 22: Operation timed out

ssh: connect to host ec2-52-43-0-65.us-west-2.compute.amazonaws.com

port 22: Operation timed out

Corresponding Security Group allos all inbound traffic on all ports. enter image description here

I tried on different internet connections, so I don't think NAT is there.

PS: I am not a first time ec2 user, used it before.

1
Are you connecting from an EC2 instance? Your security group only allows connections from systems in the same security group. Is this what you intended?John Hanley
Nope I wasn't . I see. changed to 0.0.0.0/0 and now it works. Thanksishandutta2007

1 Answers

8
votes

enter image description hereChanged Security Group's source from sg-57710f2a to 0.0.0.0/0 Now it works. As @john-hanley pointed out sg-57710f2a allows only connection from within host under that Security Group not outside