Ever typed SSH user@server, waited 30 seconds, and got that dreaded “Connection timed out” message? You’re not alone. In my nine years of managing remote servers, SSH failures account for probably 70% of the support emails I get from readers in Indonesia, the Philippines, and Vietnam. And here’s the surprising part: most of these problems take less than five minutes to fix once you know what to look for.
This guide walks through every common SSH connection problem I’ve personally encountered — from mobile networks in Jakarta silently blocking port 22 to that one time I spent two hours debugging a “broken” server that was actually just a typo in my config. Yes, really. Let’s dig in.
Before you panic, narrow down the failure point. SSH connections break in three places: your device, the network in between, or the server itself. Figuring out which one is broken saves you from fixing the wrong thing entirely. Run this simple test from your terminal or SSH app: ping your-server-ip No response? The server might be down, or ICMP is blocked (common on hardened servers, so don’t panic yet). Got a ping but SSH still fails? Then it’s almost certainly a port, authentication, or firewall issue. This 10-second check has saved me countless hours. Seriously, do this first. This is the classic. Your machine sent the request and got… silence. Nine times out of ten, one of these is the culprit: The quick fix for restrictive networks: run SSH over port 443. It looks like regular HTTPS traffic, so almost no network blocks it. Services like ClaudeSSH.com support port 443 connections natively, which is honestly a lifesaver if you’re tunneling from a university wifi. Good news: this error is actually more informative than a timeout. It means the server is up and reachable — it’s just not listening on the port you’re hitting. Either the SSH daemon (sshd) isn’t running, or it’s on a different port. On the server side, check with: sudo systemctl status sshd If it’s dead, restart it. If you can’t reach the server at all (this is the chicken-and-egg problem), use your hosting provider’s web console or VNC access. Been there. It’s annoying, but it works. Now we’re in authentication territory. The server sees you — it just doesn’t like your credentials. That verbose flag is underrated. I debug 80% of auth issues just by reading the -v output. Make it a habit. So frustrating. You’re connected, everything’s fine, then boom — frozen terminal. This is almost always a NAT timeout on mobile networks. Carrier-grade NAT (very common on 3G/4G connections across Southeast Asia) kills idle connections aggressively. fix it by adding keep-alive settings to your ~/.SSH/config: Host * This sends a tiny packet every 30 seconds so the connection never looks “idle.” Problem solved. Works on Android terminal apps too — Termius and Termux both respect the config file. If menurut we, this happens when the server’s identity key changes — usually after a reinstall, or (rarely, but it matters) an actual security breach. SSH protects you by refusing to connect to a server that “looks different” from what it remembers. If you know the change is legitimate (you reinstalled the OS, for example), remove the old entry: SSH-keygen -R your-server-ip But if you didn’t change anything on the server? Stop and investigate. Don’t blindly accept the new key. This is one of those moments where paranoia is a feature, not a bug. Not a failure exactly, but painful enough to count. The usual suspect is reverse DNS lookup — the server tries to resolve your IP into a hostname and waits for a timeout before showing the password prompt. fix on the server: open /etc/SSH/sshd_config, find or add UseDNS no, then restart sshd. Logins that took 15 seconds suddenly take one. It feels like magic. It isn’t — it’s just DNS. For a similar approach, check out SSH WebSocket tutorial for Beginners. Since a lot of you are reading this on a phone, let’s talk mobile. On Android, the most common issues I see are: apps being killed in the background (breaking long-running tunnels), DNS resolution problems on certain carriers, and battery optimization silently terminating Termux sessions. Practical tips from my own testing: Still stuck? Work through this in order — it’s the same process I use when a reader emails me at 11 PM with a dead connection: You may also want to explore NekoBox setup guide for Android: 7 Easy for additional free servers. Step 3 is the one people skip most often, and it’s the most revealing. I once spent an entire evening debugging “server issues” that turned out to be my hotel wifi blocking everything except ports 80 and 443. Switching to my phone’s hotspot fixed it in ten seconds. Facepalm moment, for sure. Fixing problems is fine. Avoiding them is better. Three habits that have kept my own connections stable for years: 1. Use SSH config files religiously. Define your hosts once — IP, port, username, key file. Fewer typos, faster connections, and your settings survive app reinstallations if you back them up. 2. Set up key-based auth with a passphrase. Passwords fail, keys don’t typo. And no more “Permission denied” because you fat-fingered the password on a phone keyboard (we’ve all done it). 3. Use a reliable SSH provider for tunneling. If you’re using SSH for VPN-style tunneling or secure browsing on Android, server quality matters enormously. Free servers with 200 users crammed onto them will time out constantly. I’ve tested quite a few services, and the ones with dedicated regional servers — like the Singapore and Jakarta nodes on ClaudeSSH.com — consistently outperform the random free lists floating around Telegram groups. Screenshot this section. I mean it — you’ll want it the next time your terminal throws one of these at you at the worst possible moment. SSH connection problems look scary, but as you’ve seen, almost every one has a two-minute fix once you can read the error message. Start with the ping test, match your error to the list above, and work through the fix. That’s genuinely all there is to it. And if you want a stable server to practice on — or you’re setting up your first SSH tunnel on Android — grab a free account at ClaudeSSH.com. You’ll get access to properly maintained servers with port 443 support, so you can test everything in this guide without worrying about carrier blocks or overcrowded nodes. Takes about a minute to sign up. Got an SSH error this guide didn’t cover? Drop it in the comments — I read all of them, and the weird ones usually end up in the next update of this article. Happy tunneling! You can also create the same type of account on RouterSSH SSH SSL — it covers 196 countries with unlimited bandwidth.
ServerAliveInterval 30
ServerAliveCountMax 6
