2 回答
- 最新
- 投票最多
- 评论最多
1
Hi, please follow https://repost.aws/knowledge-center/ec2-instance-connect-troubleshooting for detailled guidance on troubleshooting connection with Instance Connect.
It is most often an issue with security or IP routing in your VPC.
Best,
Didier
0
Approach 1
Please check the security settings. You might need to add inbound SSH connections from everywhere. If it's all okay, then follow approach two.
Approach 2
-
- Connect to your instance using SSH.
-
- Use the SSH key pair that was assigned to your instance when you launched it and use the default user name of the AMI that you used to launch your instance , for Amazon Linux 2, the default user name is ec2-user
-
- Use the following command to SSH into your instance:
ssh -i my_ec2_private_key.pem ec2-user@<your instance's public DNS name>
-
Install the EC2 Instance Connect package on your instance. For Amazon Linux 2, use the yum install command.
sudo yum install ec2-instance-connect
Approach 3
- Go to your AWS EC2 console
- Select your instance that is not able to connect
- Stop your instance
- Go to Actions -> Instance Settings -> Edit User Data
- Add user data in to update Firewall setting etc in user data
- Save this and restart instance.
已回答 8 个月前
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
Did you try troubleshooting on your own? What have you tried / done?