Write failed : broken pipe

This should resolve the problem for ubuntu and linux mint add:

ServerAliveInterval 120
TCPKeepAlive yes

to /etc/ssh/ssh_config file


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.


You can use "screen" util for that. Just connect to the server over SSH, start screen session by "screen" command execution, start your command there and disconnect (don't exit screen session). When you think your command already done you can connect to the server and attach to your screen session where you can see the command execution result/progress (in case one should be).

See "man screen" for more details.

Tags:

Terminal

Ssh