Can't connect to ec2 instance

0

As the title states I can't connect to my ec2 instance. Ive checked the security group and everything looks fine. When I try to ssh the connection times out. I can't even connect to the ec2 instance through the console either. When I try it through the console it says EC2 Instance Connect is unable to connect to your instance. I did have my account reactivated a few months ago not sure if that had something to do with it or not. I've tried multiple ec2 instances multiple different security groups. I can't seem to connect.

George
asked 3 months ago144 views
3 Answers
2

Hi,

Please, follow the guidance of this KB article to understand your issue and fix it: https://repost.aws/knowledge-center/ec2-instance-connect-troubleshooting

Best,

Didier

profile pictureAWS
EXPERT
answered 3 months ago
AWS
EXPERT
reviewed 3 months ago
0

Hello,

Multiple EC2 instances failing SSH and Instance Connect points to a broader issue. Check these:

  • Network: Is your instance in a public subnet with internet access?
  • Security Group: Does it allow SSH access from your IP on port 22?
  • EC2 Instance Connect:
  • Is your OS compatible?
  • Is the agent installed and running?
  • IAM Permissions: Does your IAM user have permission for EC2 Instance Connect?

Also, sometimes issue with your account... try to contact with Support team

troubleshoot your EC2 connection issue: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html

Refer this link: https://repost.aws/knowledge-center/ec2-linux-ssh-troubleshooting

profile picture
EXPERT
answered 3 months ago
0

Certainly! Here's a concise checklist to troubleshoot and resolve your EC2 connection issues: Instance State: Ensure the EC2 instance is in the "running" state and check instance status checks.

Security Group Rules: Inbound: Allow TCP port 22 from your IP (your_public_ip/32 or 0.0.0.0/0 for all IPs). Outbound: Allow all traffic.

Network ACLs: Ensure inbound and outbound rules allow TCP port 22.

Public IP: Verify the instance has a public IP if connecting from the internet.

Route Tables: Check that the route table for the subnet includes a route to an internet gateway (0.0.0.0/0 to igw-xxxxxxxx).

Correct Key Pair: Use the correct private key for SSH: System Logs: Check system logs in the EC2 console for boot issues.

shCopy codessh -i /path/to/your-key.pem ec2-user@your-instance-public-ip 
EXPERT
answered 3 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