If I am leaving my computer for an indeterminate amount of time should I exit the SSH session beforehand?

I often see "Broken pipe" when I leave it open and have to SSH in again. This doesn't bother me but I am curious whether it could potentially have any harmful effects on anything if it happens a lot, or if it doesn't matter?

  • Not directly an answer to your question, but maybe a terminal multiplexer like screen or tmux might be of interest. Among other helpful features like splitting the screen and handling multiple sessions at once, you can disconnect from a session that keeps running in the background. At a later time, you can SSH in again, reconnect to the session and continue where you left off. Also, there's byobu, a window manager that runs on top of screen or tmux with some very nice features. – Henning Kockerbeck Nov 4 '16 at 21:59

ssh connects a client and a server over a TCP socket, and the sockets can be thought of a two way pipe. Whatever you send on one end, will be available on the other, and vice versa.

Broken Pipe is a generic socket error message which means the socket has been teared down i.e. the communication pipe is broken. This is not strictly related to ssh protocol but to socket and how the connections can be teared down.

It's not harmful per se, but any ongoing transfer will be lost, so depending on the value of the transfer you can measure the harmfulness for your case.


ssh gives the "Broken pipe" error message when the connection to the other end drops. Other than having to re-establish the ssh session(s), nothing to worry about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.