Can't login to new instance Amazon Linux 2023 AMI

0

I just started an instance with Amazon Linux 2023 AMI and cannot connect to it.

It says No supported authentication methods available

It is using my existing keys that work with other instances.

I can't connect using the console either, it says:

Failed to connect to your instance EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance Connect. For more information, see EC2 Instance Connect Prerequisites at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html.

asked 5 months ago294 views
1 Answer
1

One thing to look at.

  1. Does the Security Group all inbound SSH acces from your IP Address? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
  2. Are you referencing you local key correctly and did you specify the correct key when setting up your instance?

I don't generally use ssh keys these days to connect to my instances. You may not have to use one either. - I prefer to connect to instance using Systems Manager Session Manager. I find it more secure and since I don't have to manage ssh keys, easier to use. You also don't have to setup exceptions in the security groups to use it. If you are running an Amazon Linux instance the agent is already installed, you just have to give it authorization to access the service. Some details here.

To Use Session manager . .
Here are steps to setup an instance profile on an EC2 instance for AWS Systems Manager Session Manager:

  1. Create an IAM role with the required SSM permissions. At a minimum, this role needs the AmazonSSMManagedInstanceCore policy attached.

  2. Create an instance profile and associate the IAM role you created to it. An instance profile allows an EC2 instance to inherit permissions from a role.

  3. Modify the security settings of the instance and attach the new instance profile and its associated IAM role to the instance. the preinstalled agent should be now able to communicate with Systems Manager.

  4. Make sure appropriate inbound/outbound network access is allowed in your security groups for Systems Manager connectivity.

  5. Test connectivity by trying to start a session with the EC2 instance through Session Manager in the AWS console or CLI.

The instance profile will now allow that EC2 instance to have the permissions needed to interface with Session Manager. Here is a link to the Systems Manager Session Manager Setup Guide. . . https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html

profile pictureAWS
answered 5 months 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