Write failed : broken pipe

This should resolve the problem for Mac osX version: 10.8.2


ServerAliveInterval 120
TCPKeepAlive no

to this file:


Or, if you want it to be a global change in the SSH client, to this file


“ServerAliveInterval 120” basically says to “ping” the server with a NULL packet every 120s, and “TCPKeepAlive no” means to not set the SO_KEEPALIVE socket option (since you shouldn’t need it with ServerAliveInterval already set, and apparently it’s “spoofable” or some odd).

The servers similarly have something they could set for the same effect (ClientKeepAliveInterval) but typically you don’t have control over those settings as much.

Leave a Comment