Score:0

How to connect EC2 instance from free wifi through putty

id flag

I can connect to AWS EC2 Instance using PuTTY at my home by laptop. But when I bring the laptop to some cafe that provides free Wifi, it ends up with timeout error.

In order to solve this problem, I need to fix the security group attached to the EC2 instance to allow the connection from the cafe’s public IP.

Here is what I've done.

1.Log into AWS ec2

2.Search for "VPC" in the search bar at the top

3.Click on VPC

4.Click on "security groups" on the left

5.Edit Inbound rule

6.Add an ingress rule with SSH/22 and input Cafe's IP with /32

Here is image of settings.

enter image description here

But still can not connect to EC2. What should I see next?

cn flag
There are many things that can cause problems here. Routing, Security Groups, NACLs, IPtables, the cafe's firewall. I would always start with a diagram of the links in the chain (you -> router -> internet -> VPC -> EC2 for instance), and check each bit. Debugging these issues is a case of being thorough and methodical.
cn flag
Do you have any logs you can provide us?
Score:0
gp flag
Tim

Your SG looks ok. It's pretty common for cafes and such to block everything other than http(s). To use ssh in that case you would need a VPN that works over https to use as a proxy to access ssh.

A better option is to use Systems Manager Session Manager. You log into the AWS console EC2 area then get an SSH terminal from there into your instance. This relies on a specific agent being installed on your instance, but many AWS AMIs have it installed by default. You also need to do a bit of configuration to get Session Manager working, it can be a bit fiddly but it's well documented by AWS.

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.