Score:0

SSH login timeout before authentication

dk flag

I have an OCI instance running Rocky Linux 9.2. It is running a production website but for some reason I have suddenly stopped being able to log in with SSH.

I have tested the connection to port 22 by using another OCI instance on the same subnet and security list.

I can confirm by checking /etc/secure.log via the web console that connections are reaching the server on port 22. There are messages of rejected root logins and I see an error of: "fatal: Timeout before authentication" that appears when I try to log in with an SSH client.

I know my password is correct (tested and working recently) and I have tested with valid ssh keys too (again recently working). I have tested from different locations around the globe just to be sure and all fail with the same message.

The SSH client gives me a message of: Operation timed out.

So I have ruled out firewall, security lists, sshd server running, and client error.

I have searched and searched the internet for the last couple of days but I could not find anyone with exactly these same symptoms. One of the closest things I found was a reference to changing the system limits that caused the loss of SSH for someone: Increase FD limitation then SSH not working?

I had been editing my /etc/sysctl.config but the problem persists even after undoing the few changes I made (and rebooting).

I am stumped and would appreciate any pointers to what I might try next.

Thank you!

jp flag
Use `ssh -v` on the client side to check negotiation and `tcpdump` to check for packet loss.
kab00m avatar
br flag
Check MTU settings. Such a behavior often happen if starting packets goes through but first 1500-byte one does not. Change MTU on your client computer to 1280 (very safe for any network) and try again.
fvlasie avatar
dk flag
Thanks @AlexD! `ssh -vvv` does not reveal anything different from a working SSH connection other than not displaying any messages after `debug1: Connecting to example.com port 22.` until we see `ssh: connect to host example.com port 22: Operation timed out`
fvlasie avatar
dk flag
Thanks @kab00m! I tried a smaller packet size as suggested but the connection still fails.
fvlasie avatar
dk flag
`tcpdump ` show no dropped packets during a connection attempt...
kab00m avatar
br flag
tcpdump will not show big packets if they were dropped somewhere on network. Maybe somehow you can set MTU 1280 on remote server and check again.
Score:0
dk flag

It turns out Cloudflare does not proxy port 22 which means that traffic gets dropped if going through Cloudflare. The solution turned out to be:

  1. Use the IP address directly.
  2. Create a subdomain in Cloudflare that is not proxied and connect through that.
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.