Re: sshd doesn't disconnect for 30+ minutes after the TCP connection is closed ungracefully

From: Peter Wemm <peter_at_wemm.org>
Date: Tue, 07 Mar 2023 01:44:54 UTC
On 3/6/23 13:04, Mark Delany wrote:
> On 06Mar23, Peter Wemm allegedly wrote:
>> (~/.ssh/config with ServerAlive* probes) for different reasons.  The
>> (overloaded) router would drop connections that seemed idle.  Sending
>> probes helped prevent that - or at least making the router drop somebody
>> else's instead.
> Probably explains why I, quite likely on the same shuttle, ended up running this on the
> client side of my terminal sessions:
>
> while :
> do
>        ssh snake.corp.youknowhoo.com tmux emacs
>        echo Some dirty rat caused my connection to drop...again!
>        sleep 2
> done
>
"mosh" turned out to be a better solution in the longer run for me.  It 
would survive switching between shuttle and mobile data transparently.

You needed a reliable jump host with udp access though.

-Peter