ERROR: "Connection timed out"

0

I'm having trouble with establishing a SSH connection from my local machine using Git bash to AWS EC2 ubuntu instance. Every time same error occurs "Connection timed out". My local machine is windows 11 home single language & have basic AWS account. Could someone please help me understand why I'm getting this error and how to resolve it? Here's the error message I'm seeing:

ssh -i "my_key.pem" ubuntu@my_public_ip.compute.amazonaws.com

Error: ssh: connect to host my_public_ip.ap-south-1.compute.amazonaws.com port 22: Connection timed out

Any guidance would be appreciated. Thank you!

NOTE: Above, I changed my original public IP address for security purpose.

  • Can anyone please confirm if a Windows 11 Home single language edition laptop supports SSH connections from local machine to an AWS EC2 Ubuntu instance?

asked 6 months ago726 views
1 Answer
1

Hello.

Since it is a timeout error, please check whether SSH is allowed in the inbound rules of the EC2 security group.
Also, please check that the IP address of EC2 is correct and that communication is not denied by the network ACL of the subnet where EC2 is running.
General troubleshooting methods are described in the document below, so please read it once.
https://repost.aws/knowledge-center/ec2-linux-resolve-ssh-connection-errors

profile picture
EXPERT
answered 6 months ago
profile picture
EXPERT
reviewed 6 months ago
profile pictureAWS
EXPERT
reviewed 6 months ago
  • Hi, Yes, SSH is allowed in the inbound rules of the EC2 security group. IP address of EC2 is correct Also, communication is not denied by the network ACL of the subnet where EC2 is running. I followed the general troubleshooting methods as described in the document whose URL you provided. But the error "Connection timed out" still persists.

  • Please confirm your security group rule allows your public ip address to connect and not your local windows IP address.

  • Yes, my security group rule allows my public IP address to connect. but error "Connection timed out" still persists.

  • Can anyone please confirm if a Windows 11 Home single language edition laptop supports SSH connections from local machine to an AWS EC2 Ubuntu instance?

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