SSH write failed broken pipe

When SSH to a machine, it sometimes pops up:
Write failed: Broken pipe

It’s usually because the SSHD on the server sees that a connection has been closed at some point without a message, and then the client side breaks.

There are three solutions:
Add the following configuration in /etc/ssh/sshd_config of the server: ClientAliveInterval 60

2 if it is difficult to change the server, you can change the client setting: add config file in ~/.ssh/ folder, and add the following configuration: ServerAliveInterval 10, tell the SSH client to send a “keep-alive” packet to the other side every 10 seconds.
3 If you only want to use it temporarily for one operation, you can add an argument to the login command: sSH-O ServerAliveInterval=10 [email protected].

Author: hongchangfirst
Hongchangfirst homepage:

Read More: