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

gefragt vor 4 Jahren2658 Aufrufe
3 Antworten
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.

beantwortet vor 4 Jahren
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.

beantwortet vor 4 Jahren
0

Anytime.

beantwortet vor 4 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen