내용으로 건너뛰기

Why unable to connect with Instance Connect despite all inbound and outbound ports open

0

Enter image description here

Enter image description here Enter image description here

Despite all inbound and outbound port opens, not sure why this message showing:

Port 22 (SSH) is not authorizedPort 22 (SSH) is currently not authorized by your security group. To use EC2 Instance Connect, you must authorize port 22 for the EC2 Instance Connect service IP addresses in your Region: 13.233.177.0/29.

질문됨 2년 전3천회 조회

4개 답변
5

Hello, following are some of the chances to ec2 instance connection failure.

Ensure your instance is in a public subnet with an internet gateway attached for outbound traffic and update your security group to allow inbound communication from EC2 Instance Connect IP addresses like '13.233.177.0/29'. Additionally, confirm instance status, verify IAM permissions, and check for any region-specific maintenance on the AWS Service Health Dashboard.

1.Public Subnet and Internet Gateway: Ensure your instance is in a public subnet with an internet gateway attached to allow outbound traffic required for Instance Connect.

2.EC2 Instance Connect IP Addresses: Authorize port 22 for the EC2 Instance Connect service IP addresses (e.g., 13.233.177.0/29) in your security group.

3.Instance State: Confirm that your instance is running and reachable for Instance Connect to function properly.

4.IAM Permissions: Verify that the IAM user or role you're using has the necessary permissions for Instance Connect.

5.Region Maintenance: Check the AWS Service Health Dashboard for any ongoing maintenance or disruptions in your region.

전문가

답변함 2년 전

전문가

검토됨 2년 전

3

Here's how you can authorize port 22 for EC2 Instance Connect:

Go to the EC2 dashboard in the AWS Management Console.

Select the EC2 instance for which you want to enable Instance Connect.

Click on the "Security" tab in the instance details pane.

Find the security group associated with your instance.

Click on the linked security group to edit its rules.

Add a new inbound rule for SSH (port 22) with the source set to 13.233.177.0/29.

Save the changes to the security group.

전문가

답변함 2년 전

2
수락된 답변

Hello.

There is a problem with the rules set in the security group.
Please add a rule with "13.233.177.0/29" set as the inbound rule source.
The rules you are currently using only allow communication from ENIs that have specific security groups configured.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-security-groups.html#updating-security-group-rules

전문가

답변함 2년 전

전문가

검토됨 2년 전

0

Hi

Here are the IP ranges needs to open the SG https://ip-ranges.amazonaws.com/ip-ranges.json you can find the region , Look at the link for more information https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-tutorial.html#eic-tut1-task2

전문가

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.