Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the broken-pipe problem while using ssh to another Linux server (after idling for about 5-10 mins):

Write failed: Broken pipe

Interestingly, I started to have this problem after upgrading my computer to Ubuntu 10.04, while the Linux server remains unchanged. I also tried to ssh from an OpenSUSE 11.2 machine, and it doesn't have any problem ...

Any clue?

share|improve this question

migrated from Jun 22 '10 at 20:31

This question came from our site for professional and enthusiast programmers.

Same problem , after idling ssh returns Write Filed Broken pipe. – Maxwell Aug 26 '10 at 12:40

I think it could be a case of routers/firewalls/etc forcibly disconnecting your idle sessions.

Try using a 'keepalive' when you connect

ssh -o TCPKeepAlive=yes

Note: there's definitely several other ways to set up keepalives on an ssh connection, server side or client side. Above is a straightforward client-side one.


share|improve this answer
also try playing with the ServerAliveInterval option - ssh -o ServerAliveInterval=30 – laher Jun 21 '10 at 22:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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