Stop worrying if your SSH session will drop before you finish that massive config change
SSH & Remote Administration
Stop worrying if your SSH session will drop before you finish that massive config change
🧩 The Challenge
Everyone has had their heart skip a beat when the network blips mid-edit and the SSH connection hangs indefinitely. You end up with a orphan process and no way to easily resume where you left off.
💡 The Fix
Use mosh instead of raw SSH for your remote sessions. It handles intermittent connections like a champ and keeps your session alive even when your laptop changes IP addresses.
mosh user@remote-host
⚙️ Why It Works
Unlike standard SSH which relies on a single TCP connection, mosh runs over UDP and syncs the state of the terminal rather than just the byte stream. This means you can close your lid, hop on a train, and wake up right back at your prompt.
🚀 Pro-Tip: Just make sure you open the UDP ports in your firewall, or you’ll be staring at a connection timeout screen for an hour wondering what happened.
Linux Tips & Tricks | © ngelinux.com | 10/5/2026
