- 最新
- 最多得票
- 最多評論
Connection timeout is typically related to end to end network connectivity issue and not to username or file permission. Have you followed the Knowledge Article guideline at: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-resolve-ssh-connection-errors/
Also do check that the subnet you deployed this EC2 instance into has route to Internet.
You can also try out the Session Manager instead of SSH connection as way to launch a secure connection into your Instance. Check out more here: https://aws.amazon.com/blogs/aws/new-session-manager/
Your second paragraph provided the answer. The subnet deployed to the EC2 instance did not have a route to the internet... I have been poking this so long now that I was surprised to see it finally connect.
Hi ! Thanks for using AWS re:Post and providing a brief description of the issue.
It seems that you have tried all the necessary steps for diagnosing the issue . I would suggest having a look at the Route table for the instance and making sure it has an internet gateway attached to it as you are trying to SSH to an instance using its public IP over the internet. Hence, the instance needs to be launched in a public subnet with an internet gateway in its route table (and not NAT gw) . If you need further help, Try opening a ticket with AWS support for their insights as well .
Reference :
[] Troubleshoot connecting to your instance - Error connecting to your instance: Connection timed out - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectionTimeout
I checked the internet gateway.. but missed the "subnet with internet gateway" part... After rereading this, I see that your answer is also correct.. Thank you.
相關內容
- 已提問 1 年前
- 已提問 7 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 8 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
Can you run the ssh command with the '-v' to see if the debugging information would give a clue?