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:
- I'm using Windows 11 and VS Code.
- I did all the steps to use the private key in Windows.
- I am using a personal computer on the internet.
- Port Range 22 and 3389 are configured to my IP.

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