Stop waiting for an unresponsive SSH session to drop when your VPN dies
SSH & Remote Administration
Stop waiting for an unresponsive SSH session to drop when your VPN dies
🧩 The Challenge
Ever stared at a frozen terminal for twenty minutes because your corporate VPN hiccuped, only to realize you can’t even close the window? I’ve lost count of how many times I’ve hammered ctrl-c on a dead session before finally resorting to killing my entire terminal emulator.
💡 The Fix
You can force a dead connection to drop immediately by using the hidden SSH escape sequence instead of waiting around for the TCP timeout to kick in.
Press Enter, then type tilde followed by dot (~.)
⚙️ Why It Works
SSH listens for specific characters right after a newline on your local end, and typing tilde-dot tells the client to immediately terminate the connection from the inside out.
🚀 Pro-Tip: If you need to detach from a hung session instead of killing it entirely, use tilde-control-z to background the ssh process.
Linux Tips & Tricks | © ngelinux.com | 12/2/2026
