Helge Kreutzmann <deb...@helgefjell.de> writes:

> About a week ago the connections started to terminate quickly, i.e.
> after a few minutes (I can time this, if this is of any importance).  So
> I return to the ssh client, and on the first key I hit, the session is
> terminated and I get a message like:

> Connection to 142.132.201.35 closed.
> client_loop: send disconnect: Broken pipe

Every time I personally have seen this specific symptom, it's because
someone has changed the configuration of a network firewall or NAT
translation box between me and the server and TCP sessions are now being
dropped after a short idle timeout.

Try adding:

    ServerAliveInterval 50

to the relevant block in your client .ssh/config.  This will force the
client to do network activity on the connection every 50s, which will
hopefully be faster than the couple of minutes of inactivity timeout that
I suspect you're seeing.  If this makes the problem go away, that makes it
more likely that you're encountering some intermediate network hop with an
aggressive idle connection timeout.

This is not necessarily a firewall.  I have seen this behavior even with
home network wireless routers.  I blame it on network gear that has only
ever been tested with HTTP traffic and has no idea what to do with
long-lived persistent TCP connections that don't have constant traffic.

-- 
Russ Allbery (r...@debian.org)              <https://www.eyrie.org/~eagle/>

Reply via email to