ec2 instances related

0

when i m trying to connect with my ec2 instances i m getting this error help me out.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 Set up EC2 Instance Connect at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html.

asked 2 years ago294 views
2 Answers
0

First, you will need to determine if your EC2 meets the prerequisites for EC2 Instance Connect from the URL listed in the error message.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html
The prerequisites are as follows.
Make sure this is all clear.

  • Launch the instance with one of the following supported AMIs:
    Amazon Linux 2 (any version)
    Ubuntu 16.04 or later
  • Verify the general prerequisites for EC2 Instance Connect.
    For more information, see Prerequisites.
  • Verify the general prerequisites for connecting to your instance using SSH.
    For more information, see Set up to connect to your instance.
  • Get the ID of the instance.
    You can get the ID of your instance using the Amazon EC2 console (from the Instance ID column). If you prefer, you can use the describe-instances (AWS CLI) or Get-EC2Instance (AWS Tools for Windows PowerShell) command.
  • Install an SSH client on your local computer.
    Your local computer most likely has an SSH client installed by default. You can check for an SSH client by typing ssh at the command line. If your local computer doesn't recognize the command, you can install an SSH client. For information about installing an SSH client on Linux or macOS X, see http://www.openssh.com. For information about installing an SSH client on Windows 10, see OpenSSH in Windows.
  • (Ubuntu) Install the AWS CLI on your instance.
    To install EC2 Instance Connect on an Ubuntu instance, you must use the AWS CLI on the instance. For more information about installing the AWS CLI, see Installing the AWS CLI in the AWS Command Line Interface User Guide.
profile picture
EXPERT
answered 2 years ago
profile pictureAWS
EXPERT
reviewed 2 years ago
0

Hi,

The most frequent issue is a missing inbound rules for SSH (tcp port 22) on the sec group attached to your instance

See section Browser-based SSH connections of https://repost.aws/knowledge-center/ec2-instance-connect-troubleshooting to check it easily via either Get-AWSPublicIpAddressRange on Windows or curl + jq on Linux

Best, Didier

profile pictureAWS
EXPERT
answered 2 years 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