Write failed: Broken pipe

June 4, 2013 5.8k views
I'm getting this quite often within Terminal on OSX, then it kicks me off the server, and i need to login again... i think it's probably the timeout, but it' happens really quick is there any way i can increase it?
4 Answers

You can also configure your client to keep alive the connection every n seconds with ServerAliveInterval.

Edit /etc/ssh/ssh_config or ~/.ssh/config and add

ServerAliveInterval 360

It will send a keep alive every 360 seconds. Goes under the Host * directive so it applies to all the boxes you connect to. And that way you don't need to edit sshd_config on all your servers.

You can increase the timeout in the /etc/ssh/sshd_config file (ClientAliveInterval).

None of these options seem to be available on nginx server?

I changed the ClientAliveInterval setting but I still get kicked out. Only on OSX.

Have another answer? Share your knowledge.