Getting rid of the dreaded “Write failed: Broken pipe”.
Note the difference of ServerAliveInterval/ServerAliveCountMax and ClientAliveInterval/ClientAliveCountMax.
For Mac, Linux and CygWin:
To enable the keep alive system-wide (root access required), edit
/etc/ssh/ssh_config; to set the settings for just your user, edit~/.ssh/config(create the file if it doesn’t exist). Insert the following:Host * ServerAliveInterval 300 ServerAliveCountMax 2You can also make your OpenSSH server keep alive all connections with clients by adding the following to
/etc/ssh/sshd_config:ClientAliveInterval 300 ClientAliveCountMax 2
–jeroen
via: How to Keep Alive SSH Sessions.
Filed under: *nix, Apple, Cygwin, Linux, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X, OS X Leopard, OS X Lion, OS X Maverick, OS X Mountain Lion, OS X Snow Leopard, OS X Tiger, Power User, SuSE Linux