简体   繁体   中英

AWS EC2 instance connection timeout issue

Here are the steps to indicating problems. Successfully ssh AWS EC2 ubuntu instance using shh commands. Stopped/rebooted aws instance. Trying to shh login again with new Ip address and getting error Connection time out.

Once you restarted your EC2 instance,public IP got changed.If you want to stop instance's public ip to get change on every restart/termination then please use Elastic IP. Elastic Ips associated with account and not the instance so you can assign Elastic Ip on any instance you want.

Please use below command to connect: ssh ssh -v -i primary_key.pem user@

Another option is to Log into your Amazon AWS Console and check running instance then copy Public DNS and try to connect with ssh. (ssk key is the same)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM