Write failed : broken pipe

This should resolve the problem for Mac osX version: 10.8.2

add:

ServerAliveInterval 120
TCPKeepAlive no

to this file:

~/.ssh/config

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

/private/etc/ssh_config

“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