This tutorial solves the problem of sudden SSH disconnection in Linux client_loop: send disconnect: Broken pipe.
The most secure connection to a remote server is through an SSH cryptographic network protocol (Secure Shell).
A common problem administratorii of servers or those who make connections via SSH via Terminal or Putty, is the sudden disconnection from the session with the message: “client_loop: send disconnect: Broken pipe“.
Most of the time, this disconnection message appears after a period in which no command line has been executed in the session SSH. Many prefer to remember from time to time the open session and give a "Enter” or a “w” so that the session remains open. A better solution is that this sudden closing of the session after a period of "idle" to have no place.
How to prevent a sudden termination of an SSH session with the error client_loop: send disconnect: Broken pipe in Terminal (Linux / Mac)
both Linux as well as Mac, a line will be added in the SSH configuration. We open and edit the file “ssh_config“.
sudo nano /etc/ssh/ssh_config
We add the line:
Host * ServerAliveInterval 120
Save and close the file "ssh_config“. If we are on Linux we will have to restart the "sshd" service.
Related: Prevent SSH Connection Timing Out / Broken Pipe
Senior Management “ServerAliveInterval“ will send a null packet to the server at 120-second intervals to keep the session alive and thus prevent it from closing abruptly.
If you are only changing ssh_config (and not sshd_config) there is no reason to restart sshd.
Zeal doubles razlaga. Hvala za vas clanek