packet_write_wait: Connection to xxx.xxx.xxx.xxx: Broken pipe

Viewed 10324

What does it mean when the terminal throw this error and how to solve it?

packet_write_wait: Connection to xxx.xxx.xxx.xxx: Broken pipe

It was just happen today. After it work normally for year. My terminal keep disconnect at a certain time. I had already search on google but most of it is about "Write failed: Broken pipe."

Which I already solved that for years. I just found this new annoyed problems today

4 Answers

If that is an ssh connection, then you might want to make sure you send a keepalive message to the server.

ServerAliveInterval seems to be the most common strategy to keep a connection alive. To prevent the broken pipe problem, here is the ssh config I useed in my .ssh/ssh_config file (may be named as /etc/ssh/config or sshd_config):

Host myhostshortcut
     HostName myhost.com
     User barthelemy
     ServerAliveInterval 60
     ServerAliveCountMax 10
Related