ssh operation timed out

2

Hi, I am getting an error (ssh: connect to host ec2-35-154-20-103.ap-south-1.compute.amazonaws.com port 22: Operation timed out) when trying to ssh into EC2 instance.

Update: SOLVED! Details: Thankyou everyone for your quick help. My instance was running initially but it stopped running eventually. Maybe because I abruptly exited out of it (with ctrl +D). I tried deleting the instance and create a new one but it did't run. Now, I am running a new instance in a different region. This has solved the problem.

질문됨 2년 전3423회 조회
3개 답변
0

Hi

First of all, I recommend you do not post the Machine IP address publicly it is not best practice. I understand that you are not able to connect Ec2 instance ssh,

Please verify below points :

  1. Check Your Ec2 instance is having **2/2 Health Check passed **
  2. Check Security Group of Ec2 instance port is allowed from your Source Ip , Security Group must allow inbound rule Port 22 to your IP or 0.0.0.0/0 , Link to add SG https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
  3. Check if your Subnet, If it is public check Internet Gateway attached to it, Link https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html
  4. Ping IP adress if you are able to ping the IP

General Information How to Connect to Ec2 instance ...!

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html

If everything is Looks good, You should able to acess the Ec2 instance

profile picture
전문가
GK
답변함 2년 전
0

There are a few reasons why you might be getting this error, but the first thing to check is that the security group attached to the instance allows ingress traffic on port 22 from the IP address you're trying to connect from.

If that doesn't work, there are a few more solutions to try here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectionTimeout

Ed
답변함 2년 전
0

To add to the other answers, using the VPC Reachability Analyzer (https://docs.aws.amazon.com/vpc/latest/reachability/what-is-reachability-analyzer.html) may be able to track down the reason that you are unable to connect to your ec2 instance.

AWS
bendutt
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠