I'm new to using the AWS free tier and I'm having trouble connecting to a recently created instance when the inbound rules are set to only allow private IP addresses. I've added both my laptop's current public IP and my Tailscale IP to the allowed inbound rules. However, when I try to connect, I get an error saying, "Failed to connect to your instance. Error establishing SSH connection to your instance. Try again later." I can connect if I set the inbound rules to allow any public IP, but I don't want to compromise security. Can anyone suggest a workaround? Here's a quick overview of my inbound rules: - Type: SSH - Protocol: TCP - Port: 22 - Inbound Rules: Current Public IP + Tailscale IP as separate rules.
3 Answers
Glad you figured it out using PowerShell! Yeah, EC2 Instance Connect can be tricky sometimes. Just keep in mind it usually requires configuration that might not be set up by default.
Just to clarify, make sure the IP you’re adding is your public IP, not the private one. You can confirm your public IP using a site like ipchicken.com. That should be the one you want to configure in your inbound rules.
If you're not using the instance connect mode, you must ensure that you're connecting via SSH in your terminal. Alternatively, consider using AWS Session Manager if your EC2 instance has the SSM agent installed and the right IAM role. This might be a safer option.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures