Score:0

How to check ssh working between local Ubuntu and AWS instance Ubuntu

sz flag

I'm having problems making a ssh request from my local machine (Ubuntu) to an AWS instance (running Ubuntu).

Whilst I check all my AWS settings (Security Groups etc), what can I check on my local Ubuntu and the remote Ubuntu to help debug the problem?

It might be a problem with the AWS Ubuntu AMI, rather than the networking.

I ran:

sudo lsof -i -P -n | grep LISTEN

on the remote machine and got:

systemd-r  432 systemd-resolve   14u  IPv4  15211      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd       667            root    3u  IPv4  17141      0t0  TCP *:22 (LISTEN)
sshd       667            root    4u  IPv6  17152      0t0  TCP *:22 (LISTEN)
hr flag
Well, you could *make* your local machine an SSH server, then try something like `ssh localhost`. What problems are you having, exactly?
mezamorphic avatar
sz flag
@steeldriver Trying to ssh to an AWS Instance using a key but keep getting a timeout. I've got a real basic AWS setup (I havent changed any settings), followed the troubleshooting guide, so I want to check there isn't a problem on my side first.
waltinator avatar
it flag
@intrigued-66: Please [edit] your Question to add new information, properly formatted. Information added via comments is hard for you to format, hard for us to read and ignored by both current and future readers (who have better answers). Please read https://askubuntu.com/help/how-to-ask and https://askubuntu.com/help/formatting . Help us help you.
mezamorphic avatar
sz flag
@waltinator done
muru avatar
us flag
If you have a GitHub or GitLab account, you can try `ssh [email protected]`, `ssh [email protected]`, etc. test if you can access public SSH servers. If you can, then the problem is mostly in the AWS configuration (which I think is more likely) - is your instance publicly accessible, does the SG allow external SSH access, etc.?
mezamorphic avatar
sz flag
@muru turned out my default SecurityGroup didn't do what it claims. It's inbound rule was "allow everything" except it wasn't. I created a new SG, added rule for SSH and it worked. Weird.
I sit in a Tesla and translated this thread with Ai:

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.