Site icon New Generation Enterprise Linux

Stop manually killing stalled SSH connections

SSH & Remote Administration

Stop manually killing stalled SSH connections

đź§© The Challenge

Everyone has had an SSH session hang indefinitely because the wifi cut out or the remote server hit a kernel panic. Closing the terminal tab and waiting for the TCP timeout to eventually give up is a massive waste of time.

đź’ˇ The Fix

Use the built-in escape character sequence to force a disconnect immediately. It sends a terminate signal to the local SSH client without needing to kill your entire terminal window.

~ .

⚙️ Why It Works

Pressing enter followed by tilde and then the dot key sends a signal directly to the SSH process to close the connection socket. It bypasses whatever is holding up your shell and drops you back to your local prompt instantly.

🚀 Pro-Tip: If you’re stuck in a dead session and don’t know if the escape character will work, typing ~ ? will list all available control commands.

Linux Tips & Tricks | © ngelinux.com | 10/20/2026

0 0 votes
Article Rating
Exit mobile version