EC Instance Connect says "Failed to connect to your instance"

0

Hello Forum;

My instance is AlmaLinux 8.8. The instance OS is the recommended, or maybe required, operating system for the cPanel platform. I established the instance from the AWS Marketplace using the cPanel&WHM for AlmaLinux option.

The EC Instance Connect function via the Connect to instance page in my AWS control panel is not working (see images).

I have set the permissions on port 22 to allow for my IP address at: EC2 > Security Groups > sg xxxyyyxxx > Edit inbound rules

The instructions on the page recommened at the error page do not address my specific Linux version: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html

I'm not sure it matters but the IP address (redacted with grey block) on the instance screenshot was (I think) the initial IP address before I established an elastic IP address. In other words, it's the initial IP address instead of the current elastic IP address. (the bottom image with the black background)

I would appreciate help with my problem. Thank you in advance.

EC Instance Connect

Connect to instance

Source: EC2 > Instances > i-xyzabcxyzetc. > Actions (dropdown menu) > Monitor and troubleshoot > Get instance screenshot Instance screenshot

knox
질문됨 10달 전429회 조회
2개 답변
1

Afraid that EC2 Instance Connect cannot be used with Alma Linux.

The link in your original message https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html and look at the very first thing on that page.

To connect to an instance using EC2 Instance Connect, the instance must have EC2 Instance Connect installed. The following AMIs come preinstalled with EC2 Instance Connect:

Amazon Linux 2 2.0.20190618 or later

Ubuntu 20.04 or later

Alma Linux isn't on this list, so won't be pre-installed in your AMI.

Moreover, EC2 Instance Connect isn't supported on Alma Linux AMIs https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html#eic-prereqs-amis so you're not even going to be able to install it yourself and then use it.

You will need to connect to your instance using an SSH client like PuTTY (if you are on Windows, which your browser screenshots looks like you are). You're on the right track with security groups, make sure that TCP port 22 is open inbound from your IP (at a minimum, for troubleshooting purposes open TCP from 0.0.0.0/0 i.e. everywhere, you can always close it up later on).

Make sure the instance is provisioned into a subnet that has an Internet Gateway associated with it (if you're in a default subnet in the default VPC then this will already be in place) and the default user for Alma Linux appears to be ec2-user (see usage instructions in https://aws.amazon.com/marketplace/pp/prodview-mku4y3g4sjrye ).

profile picture
전문가
Steve_M
답변함 10달 전
0

Can you please take a look at Resolution section of this re:Post Knowledge Center Article.

One of the four options would certainly help you as these are most common cases, where this issue occurs.

Feel free to comment here if that doesn't help

profile pictureAWS
전문가
답변함 10달 전

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

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

질문 답변하기에 대한 가이드라인

관련 콘텐츠