On Wed, Nov 18, 2026 at 11:36:42 -0500, Chet Ramey wrote:
> OK. The ssh connection dropping should result in the bash process receiving
> a SIGHUP,

It could take a long time for the remote sshd to give up waiting for
input from the client ssh.  Sure, in the case of a clean disconnection,
your remote shell might get that SIGHUP immediately.  But if the client
is simply cut off by a power outage or whatever, the remote sshd won't
know about it right away.

sshd_config can be configured to decrease the wait time, by setting the
ClientAliveInterval and ClientAliveCountMax variables (assuming OpenSSH),
but even then, the server shutting down won't be immediate.

The earlier suggestion to always remember to run your remote session
within tmux or screen is a very good one, and should eliminate most of
the issues.

Reply via email to