port 22: Connection timed out (Ubuntu or Debiab)

0

I am trying to startup a debian or ubuntu server and I keep on getting this error I made sure port 22 is open to everyone Ports opened Please I need help

asked 9 months ago319 views
3 Answers
2

Hi,

Your security group seems quite open so that is not the problem for connectivity.

Other things that I'd check to resolve the issue are:

Public subnet/internet gateway:

Is your instance is deployed in public subnet, make sure that subnet has internet gateway attached to it's route table, otherwise resources inside that subnet can't reach to internet and hence that subnet is not public. You would need a route that sends all traffic destined outside the VPC to the internet gateway for the VPC.

Make sure there is an internet gateway attached to your VPC. Otherwise, choose Create internet gateway. On the Route table tab, verify that there is a route with 0.0.0.0/0 as the destination and the internet gateway for your VPC as the target, if you don't see this then add this route.

Network Access Control List(NACL):

Lastly you'd need to check the network access control list (ACL) for the subnet. The network ACLs must allow inbound and outbound traffic from your local IP address on the proper port. The default network ACL allows all inbound and outbound traffic.

Addition Reference:

re:Post Knowledge Center Article

Hope you find this information helpful.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
EXPERT
answered 9 months ago
1

Hello.
Have you checked your network ACLs?
Also, have you checked that there is a route to the Internet Gateway in the route table of the subnet where you started the EC2?
Please refer to the following documents for general troubleshooting instructions.
https://repost.aws/knowledge-center/ec2-linux-resolve-ssh-connection-errors

profile picture
EXPERT
answered 9 months ago
0
Accepted Answer

So when I was creating the instance i choose a private subnet.

Next time I need to choose a public subnet and automatically assign a public IP

answered 9 months 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