Unable to connect with EC2 with SSH ( i checked everything thing security group / VPC / gateway everything )

0

Unable to connect with EC2 with SSH ( i checked everything thing security group / VPC / gateway everything )

  • I have the same VPC attached to another instance, and I can connect with SSH, but I have no idea what happened to this one.

Sandeep
asked 5 months ago173 views
3 Answers
0

Since you are able to connect via SSH to another instance in the same VPC, it helps narrow down where the issue could be for this specific instance. A few more things you can try:

  • Check the number of network interfaces attached to the problematic instance. Make sure there is only one primary eth0 interface with a public IP.

  • Verify if the public IP address assigned to the instance is accessible and pingable from your network. Sometimes the public IP may be in a faulty state.

  • Look at the EC2 instance console log in the AWS console. Any boot or network errors could provide hints.

  • Try assigning a new public IP address to the instance's network interface. This will rule out any issues with the existing public IP.

  • Attempt to SSH while the instance is still booting, before the OS is fully up. See if it works then but not once fully booted. Could indicate an OS or daemon issue.

  • Reset the NIC on the instance from the AWS console. This can reset networking configurations.

  • Attach the problematic network interface to a known good instance as a secondary NIC to test in isolation.

The goal would be to isolate if the issue is with the instance itself, the network interface, public IP, or OS configuration. Since the broader VPC connectivity is known to be good, focus troubleshooting on the specific instance and its networking.

AWS
Saad
answered 5 months ago
  • It looks like I found the issue. After installing OpenSearch in Ec2, SSH stopped working. I ran new instance, and everything was good. After the installation of OpenSearch, I was not able to login to SSH. I followed the following tutorial (https://computingforgeeks.com/how-to-install-opensearch-on-ubuntu/?expand_article=1) to install OpenSearch. Anyone have any idea how i can forcefully login and reset OpenSearch?

  • i think issue is with

    ubuntu@ip-XXXXXXXXXX:/etc/nginx/sites-available$ sudo ufw enable
    Command may disrupt existing ssh connections. Proceed with operation (y|n)? n
    
0

Can you check if you have set the "0.0.0.0/0" for igw in the route table of vpc . It is required instance to access internet.

profile picture
answered 5 months ago
  • same VPC connect with another EC2 instance, and I can connect with all other EC2 instances. i tried to connect with browser, but had the same issue

0

I have the same VPC attached to another instance, and I can connect with SSH, but I have no idea what happened to this one.

Sandeep
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