can't reach via ssh my ec2 instance - I think the cause is due to the vpc.
drandredev opened this issue · 4 comments
drandredev commented
cugarteblair commented
I had the same issue. Did you ever resolve this?
cugarteblair commented
I temporarily changed the route table. Change the entry that routes to the NAT gateway route; Make it route to the internet gateway instead. Then you can access the private subnets for SSH. When you are done restore the route.
tarkin88 commented
I temporarily changed the route table. Change the entry that routes to the NAT gateway route; Make it route to the internet gateway instead. Then you can access the private subnets for SSH. When you are done restore the route.
Can you post an example, please?
Cguilliman commented
For me this temporary solution is working
resource "aws_route" "nat-gw-route" {
route_table_id = aws_route_table.private-route-table.id
# nat_gateway_id = aws_nat_gateway.nat-gw.id
gateway_id = aws_internet_gateway.production-igw.id
destination_cidr_block = "0.0.0.0/0"
}