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

已提问 4 年前2631 查看次数
3 回答
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.

已回答 4 年前
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.

已回答 4 年前
0

Anytime.

已回答 4 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则