packet_write_wait: Connection to XXX : Broken pipe

In general, I can connect to a remote machine via SSH without any troubles but occasionally in some particular setup, although I can connect to the remote machine and type commands in a shell, the connection is broken after a few minutes of connection.

This happens when we do not interact with the terminal (i.e., we do not type anything on the keyboard).

In such case, the following error message appears:

Solution:

On the host, add those lines in the file .ssh/config

If the file config does not exist, just create it.

The ServerAliveInternal pings the server with a null packet every 30 seconds. As for the second line, I have not check whether it is required or not.

This entry was posted in Linux and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.