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.

질문됨 5달 전308회 조회
1개 답변
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
답변함 5달 전

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

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

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

관련 콘텐츠