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.

profile picture
asked a month ago171 views
4 Answers
3

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.

profile picture
answered a month ago
2
Accepted Answer

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

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
Steve_M
reviewed a month ago
2

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.

answered a month ago
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

profile picture
EXPERT
GK
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions