Stop letting your SSH session die the moment you stop typing
SSH & Remote Administration
Stop letting your SSH session die the moment you stop typing
🧩 The Challenge
You know that annoyance where your terminal just hangs because your home Wi-Fi blipped or the laptop went to sleep? I’ve spent way too much time staring at a frozen cursor, wondering if the server actually died or if my client just gave up on life.
💡 The Fix
Just tell your local SSH config to send periodic heartbeats to the server so it knows you’re still there. It’s a lifesaver for long-running sessions or unstable connections.
echo "ServerAliveInterval 60" >> ~/.ssh/config
⚙️ Why It Works
Setting this interval forces the client to send a null packet to the server every sixty seconds, which keeps the firewall state open and confirms the connection is still alive. It effectively prevents those annoying silent timeouts that happen when there is no active traffic on the wire.
🚀 Pro-Tip: Stick this in your global /etc/ssh/ssh_config if you want it to apply to every user on the box without asking.
Linux Tips & Tricks | © ngelinux.com | 9/6/2026
