By using AWS re:Post, you agree to the Terms of Use

Unable to connect to EC2 instance using Public IP address with ssh

0

Hi.. i am new to AWS and learning.
I've launched a new Amazon Linux 2 EC2 instance, but not able to connect to it using SSH with the public IP address allocated.
Please note that I created a new VPC ( with new CIDR block - 10.77.0.0/16 ) and assigned here.

Prior to this, when I created the same Amazon Linux 2 EC2 instance with default VPC, i was able to connect with ssh.
Any help would be highly appreciated.

Thank you,

Edited by: NewOnCloud on May 6, 2020 11:38 AM

asked 2 years ago195 views
3 Answers
0
  1. did you confirm the security group has an inbound rule to allow port 22 from your ip address (Don't open it to all traffic!!!)
  2. Is the ec2 launched in a public subnet? A public subnet is defined as one that has an associated route table with an entry for 0.0.0.0/0 to an Internet Gateway (igw).

It's either one of those two issues, or you have a firewall issue on the ec2..which is unlikely.

answered 2 years ago
0

Thank you very much my friend.
Looks like I needed to create a new internet gateway and add it to the route table that was missing.

answered 2 years ago
0

Anytime.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions