Skip to content

I am having a trouble connecting Putty SSH(22Port) to my EC2(i-0b0d46c5614610f17)

0

I am having a trouble connecting Putty SSH(22Port) to my EC2(i-0b0d46c5614610f17). I double checked all the setting include *.ppk. And even I check an exsting working EC2. To verify my PC issue, I tried with Google Cloud Platform, It is working. So it is not issue from my PC. Would you please check my EC2 connecting SSH? Thank you.

4 Answers
0

I understand you're having trouble connecting to your EC2 instance via SSH (port 22) using PuTTY, despite having verified your settings and confirmed your PC can connect to Google Cloud Platform instances. Let me help you troubleshoot this issue.

Here are several potential causes and solutions to check:

  1. Security Group Configuration:
  • Verify that your security group has an inbound rule allowing SSH (port 22) traffic from your IP address or temporarily from anywhere (0.0.0.0/0) for testing purposes.
  1. Network Configuration:
  • Ensure your EC2 instance is in a public subnet with a route to an Internet Gateway.
  • Check that your VPC's Network ACLs are not blocking incoming SSH traffic (these are stateless and require both inbound and outbound rules).
  • Verify that your subnet's route table includes a route to the Internet Gateway for 0.0.0.0/0.
  1. Instance Configuration:
  • Confirm your instance has a public IP address assigned.
  • Verify the instance is in a "running" state and has passed all status checks.
  • Check that the SSH service (sshd) is running on the instance.
  1. Key Pair and Authentication:
  • Ensure you're using the correct .ppk file that corresponds to the key pair associated with the instance.
  • Verify the permissions on your key file are correct.

If you've checked all these items and are still unable to connect, try these additional troubleshooting steps:

  1. Try connecting using EC2 Instance Connect through the AWS Management Console as an alternative.
  2. Use AWS Systems Manager Session Manager if it's configured on your instance.
  3. Check if there are any OS-level firewall rules on the instance blocking incoming connections.
  4. Try rebooting your instance.

As a last resort, some users have reported success with a temporary workaround:

  • Modify your security group to allow "All TCP" traffic from anywhere (0.0.0.0/0)
  • Connect via SSH
  • Once connected, revert back to just allowing SSH traffic

Remember to tighten your security group rules after successfully connecting for security best practices.
Sources
Port 22: Connection Time Out Issue | AWS re:Post
SSH not working on fresh account, | AWS re:Post
Unable to ssh to an instance in AWS | AWS re:Post
Unable to SSH into AWS EC2 Instance – Connection Timed Out & Forgot Credentials | AWS re:Post

answered 9 months ago

  • Thank you for your fast help. But I tried all those. But I am still having problem.

0

Region: northeast-2 Instance Type: t3.micro Public IP assigned OS: Ubuntu 24.04 LTS I am able to connect to other Cloud platform service through putty SSH 22 port.

Security Group, VPC and to all the network properly configured. Last month, It was working properly. No configuration changed since last year. 443, 80 port working but not 22 port. Suddenly other EC2 22 port also not working. Please help. Isn't there any phone number or email I can contact to get help?

answered 9 months ago

0

It looks like the Security Group might not allow inbound SSH (port 22) from your IP. Please check that your EC2 instance’s security group has an inbound rule: Type: SSH Port: 22 Source: your current IP or 0.0.0.0/0 (for testing).

Also confirm the instance is in a public subnet with a public IP and that you’re using the correct key pair.

answered 9 months ago

0

Hello,

Additional to the rest of the comments, I suggest you to leverage the AWS service called VPC Reachability Analyzer, in order to troubleshoot and get the exact network component that might be causing the SSH timeout. Here are steps to do it:

  1. On you preferred browser, go to: https://console.aws.amazon.com/networkinsights/home#ReachabilityAnalyzer

  2. Once on that page, click on button "Create an analyze path"

  3. Choose any name you like for the network path on the box "Name tag"

  4. On "Path Source" section, select "Internet Gateways" from the dropdown "Source type". Then, select the Internet Gateway from the VPC on which you deployed your EC2 instance from the dropdown "Source".

  5. On "Path Destination", select "Instances" from the dropdown "Destination type". Then, select the instance you are trying to connect from the dropdown "Destination"

  6. Click on "Additional packet header configurations at destination - optional" and write "22" on the box "Destination port"

  7. Scroll to the bottom of the page and click on button "Create and analyze path"

  8. The analysis should begin, highlighted by the Reachability status as Pending. Give it a minute and click the refresh button to see the result. The result should be either "Reachable" or "Not reachable". Below, you will see the section "Explanations" with a comprehensive breakdown as to why the communication should work or not.

Sources: https://docs.aws.amazon.com/vpc/latest/reachability/getting-started.html#create-path

Hope this helps

Regards

AWS
EXPERT

answered 7 months ago

EXPERT

reviewed 4 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.