Reputation: 19
I am trying to connect to an ec2 ubuntu instance and I am getting a connection timed out error. : EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance
I have checked the subnet routing table and its set to internet-gateway, the network security group allows TCP http/s and ssh connections.
the connection to the instance was working fine initially, but when trying at a later point I am getting this error.
While the site/apps hosted on the instance are accessible via browser, access to instance itself is not possible.
And I launched a new ec2 instance based on the template of the 1st ec2 and I am able to connect to 2nd instance.
Upvotes: 0
Views: 78
Reputation: 19
I had enable ufw in the my instance and hence got locked out.
Answer is explained in the below question.
Locked myself out of SSH with UFW in EC2 AWS
Upvotes: 0