ssh connection randomly times out

Darren Tucker dtucker at dtucker.net
Sun Sep 20 02:22:20 AEST 2026


On Fri, 18 Sept 2026 at 18:00, James Moe via openssh-unix-dev
<openssh-unix-dev at mindrot.org> wrote:
> On 2026-09-18 15:08, Brian Candler wrote:
> > Then try this at the end of ~/.ssh/config on the client:
> > Host *
> >    ServerAliveInterval 240
>
> I added "TCPKeepAlive yes" to the .ssh/config. It did not make any difference.

Those are TCP keepalives at the OS level.  These typically kick in at
2 hours of inactivity, which is usually too infrequent to help with
this class of problem.

> I will try "ServerAliveInterval".

That is much more likely to help.

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list