Does it work when you connect via a VPN?
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
try out mosh
Have you looked into AWS Cloudwatch logs? That's usually the best bet to see what's happening on the cloud side of things.
I set up a log group for that instance and it showed nothing.
I don't know if I set it up wrong or if just means things are fine on that side.
A few suggestions:
- One of the most common causes for SSH sessions hanging is a security group assigned to the instance has an incoming IP address whitelist. If the IP address you are connecting from doesn't match, it won't let you connect and silently hangs. Easiest way is to whitelist every IP address range but that's not good practice.
More here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
-
It can also happen if the Security Group doesn't allow access via standard port 22. In that case, you need to explicitly set your port when connecting.
-
Finally, if you've set up 'password free' SSH, make sure the keypair is valid and you haven't messed up file access privs.
More here: https://aws.plainenglish.io/4-steps-to-connect-aws-servers-using-ssh-without-key-pairs-17c64853918c
Suggest you try a process of elimination. Use the console SSH client to verify connection. See if that works. Then try the above steps to narrow it down on the client side.
HTH.