Fixing Broken Pipe Error With SSH Connection

If you use SSH to connect to remote Linux servers you8217ll notice that if you keep your SSH session inactive for some time and then try to use it again the SSH session disconnects with an error message like this.

On some systems it will display 8216Write failed Broken pipe8217 or 8216Connection closed by remote host8217.

Let8217s see what causes this error and how to go about keeping your SSH connection alive.

As you may have guessed the SSH connection is closed because of inactivity. There is no set value but it usually around 5 minutes or so.

What you can do to avoid the SSH session disconnection is to send an 8216alive message8217 either from the server to client ClientAliveInterval or from client to server ServerAliveInterval at certain time interval.

This way you keep the SSH session alive because there is a communication between the client and server and the server understands that client is still there.

...

Read Full Post

News Link: https://linuxhandbook.com/ssh-broken-pipe-error/.
RSS Link: https://linuxhandbook.com/feed/.

Linux Chatter is a news aggregator service that curates some of the best Linux, Cloud, Technical Guides, Hardware and Security news. We display just enough content from the original post to spark your interest. If you like the topic, then click on the 'read full post' button to visit the author's website. Use Linux Chatter to find content from amazing authors!

Note: The content provided has been modified and is not displayed as intended by the author. Any trademarks, copyrights and rights remain with the source.

Disclaimer: Linux Chatter sources content from RSS feeds and personal content submissions. The views and opinions expressed in these articles are those of the authors and do not necessarily reflect those of Linux Chatter.