Troubleshooting EC2 Instance Network Timeout Issues: RDP/SSH Connectivity

Nikhil Chaudhari
3 min readFeb 25, 2025

--

Hello readers continuing series of “aws troubleshooting” , this is 2nd part of series. Here we will troubleshoot Network connectivity issue in EC2 instance. Below are the common scenarios/steps to check and find solution for these type of issues.

Introduction

EC2 instances are widely used in cloud computing, but sometimes users face issues connecting via RDP (Windows) or SSH (Linux). This article help you by providing a systematic approach to troubleshooting network timeouts and connectivity problems.

Scenario 1 :

Verify Security Group Settings: Ensure that the required ports are open:
RDP (Windows): 3389
— SSH
(Linux): 22
Check inbound rule if above port is not there then add them.

Scenario 2:

Check Instance Status:
— Running: Instance should be accessible.
— Pending/Stopped: Needs further investigation.

Scenario 3:

Check EC2 Instance Status Checks:
— 2/2 Passed:
System is healthy.
1/2 Passed: Possible network, antivirus, EBS, or network interface issue.
Solution: Restart the instance to refresh the EC2 state.

0/2 Passed: Indicates AWS backend hardware failure.
Solution: Stop and start the instance to switch hardware.

Scenario 4:

Check Instance Screenshot: If available, look for errors like:
— BSOD (Blue Screen of Death)
Driver-related issues
System crashes

Recovery Steps:
— Restore from the latest backup snapshot.
— Attach the snapshot to the instance in the same region.

Scenario 5:

System Logs Investigation:
— Retrieve logs from the EC2 Console to check for driver or process errors.
Solution: Search for error messages and troubleshoot accordingly.
— If the issue is complex, raise a support ticket with AWS.

Scenario 6:

Check CloudTrail Logs for Recent Changes:
* Investigate any modifications:
Removal of Elastic IP
Removal or incorrect attachment of volumes
Addition of multiple network interfaces

* Solution: Use CloudTrail to track changes:
— Copy the instance ID.
— Navigate to CloudTrail > Event History > Resource Name.
— Paste the instance ID and check for unusual activities.

Scenario 7:

Verify ACL Rules: Check Network ACLs at the VPC Level:
Go to Networking > VPC_ID > Security > Network_ACL > Inbound Rules.
— If SSH/RDP is denied, modify the ACL to allow connections.

Scenario 8:

Public vs. Private Subnet Configuration:
— Public:
Should have route 0.0.0.0/0.
Private: Cannot connect using a public IP.

Solution: Check Instance > Networking > Subnet_ID > Route Table.

Scenario 9:

Internet Gateway Missing in VPC:
Investigation:
Custom VPC setups often miss Internet Gateway configuration.

  • Solution:
    Navigate to Instance > Networking > Subnet_ID > Internet Gateways.
    — Ensure the Internet Gateway is attached.

Scenario 10:

Missing Route Table Entries:
Check Routing Entries:
Go to Route Table > Default_VPC > Routes.
— Verify the Internet Gateway entry exists.

  • Solution: Add a route to allow external connectivity.

Scenario 11:

Common Human Errors:
Incorrect public IP.
— Not copying SSH commands properly.
— Wrong username or missing key pair.
Solution: Double-check details before attempting to connect:

ssh -i my-key.pem ec2-user@<instance-ip>

Final Steps if Issue Persists

— Stop and restart the instance.
— Restore from the latest snapshot backup and attach it to the root volume. —contact aws support if necessary.

Conclusion

Troubleshooting EC2 connectivity issues requires a structured approach, starting with basic checks and move to more advanced investigations steps like system logs, CloudTrail analysis, and VPC configurations. By following the outlined steps, you can quickly diagnose and resolve RDP/SSH issues, ensuring minimal downtime. If all else fails, restoring from a backup or seeking AWS support can help get your instance back online efficiently.

I hope this article gave you, which was you searching for. If you really like this article please write comment and your view.

--

--

Nikhil Chaudhari
Nikhil Chaudhari

Written by Nikhil Chaudhari

I am (🦊) Cloud Security Researcher | | SOC Analyst | Passionate about learning & writing new technologies, tools & automations.

No responses yet