SSH dropped connections workaround (eg on Virgin Media) - write failed, broken pipe etc on Linux

A quick workaround for dropping connections and broken pipe errors.

very annoying as many X based terminal apps freeze up at this point.


ServerAliveInterval 120

to ssh_config

helps avoid this - even on the Virgin Media cable connection and the allegedly "super"hub.

(I've seen people recommend turning hub off and on and all sorts of chicken waving - including switching to Bridge Mode - which is a good idea in itself if you have a decent router/firewall you'd rather use but is the wrong answer to this particular issue imho...)

On my Xubuntu install ssh_config is in /etc/ssh but you can often use

locate ssh_config


find /etc -name ssh_config

from a terminal.