Why SSH sessions freeze after idle periods, and how keepalives and tmux help
A developer setting up their first remote server found an overnight SSH session frozen, with keystrokes and Ctrl+C having no effect. Idle connections can be silently dropped by routers or NAT devices, leaving the local client unaware the link is dead. The article explains how to escape a stuck session using SSH escape sequences and how to configure keepalive settings in the SSH config file to detect dead connections sooner. It also notes that disconnections can kill running processes, and recommends tmux, which keeps commands alive on the server and allows reattaching after a drop. The author concludes that keepalives and tmux solve different problems and are best used together.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in