Score:0

Operation timed out on port 22 - SSH into EC2 instance

cn flag

Whenever I try and connect to my EC2 instance using SSH, I get ssh: connect to host 35.xxx.xx.xxx port 22: Operation timed out.

The weird thing is that this happens the majority of the time, but not every time. Very occasionally it will let me connect just fine... Then I think the problem is fixed and celebrate! But then I get the same issue again the very next day.

I have been reading through forums trying to figure out why this might be the case.

I have tried rebooting the instance a number of times - it has an elastic IP associated to it so the public IP shouldn't change when I reboot.

My security groups have one for port range 22 with the source as: 0.0.0.0/0 I have also tried adding my local machine's IP to the list of inbound rules but with no luck.

One of the times when I could login, I also opened up port 22 using UFW and allowed SSH connections.

I'm not so well versed in the rest of the AWS technical language, but I can see that I have a VPC, but that the IPv4 CIDR contains the beginning part of the private IP address. Is that correct?

Can anyone help? Pulling my hair out slightly now...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.