Closing a stale SSH connection

Suppose you’re connected to a remote host with SSH and after a while the SSH session goes stale. The terminal is unresponsive and no keypress seem to take effect. There might be something with the network, the remote host is restarting or maybe your machine has been in hibernation, there could be multiple reasons for a stale session. The first solution that might come to mind is to just close the terminal emulator and create another one, but there is a better way....

April 4, 2023 · 2 min · David Isaksson