0

I connected to my ec2 instance successfully earlier. However, when trying to connect again, I got this error:

ssh: connect to host ec2-x-xxx-xxx-xx.compute-1.amazonaws.com port 22: Connection timed out

I checked Route table, Network ACL, Internet Gateways, Subnet, Security group, Key-pair.

I started a session and used iptable, but it didn't work. As everything seems to be ok and the same, except for one thing. I changed internet network. About the config and ssh_config files I read that they are rewritten or recreated when the command is executed.

Note:

  1. I'm using Windows 11 and VS Code.
  2. I did all the steps to use the private key in Windows.
  3. I am using a personal computer on the internet.
  4. Port Range 22 and 3389 are configured to my IP.

Log out, security group and Route Table Image

So I would like to know how to solve this IP address change issue!

hardillb
  • 1,275
  • 1
  • 9
  • 19

0 Answers0