Previous 1 2 3 Next 38 Replies Latest reply: Oct 17, 2014 9:09 AM by MacJedi56 Go to original post
  • Acideous Level 1 Level 1

    The plist fix worked for me. 

  • thelongmile Level 1 Level 1

    Very definitley didn't work for me. Did anyone do anything other than trash that plist file? I just found it, trashed in and that was it

  • Acideous Level 1 Level 1

    Okay, now the issue is back, so I am definitely thinking of looking into other fixes.  Annoying!

  • larrycz Level 1 Level 1

    Same issue here. Two 10.7.2 MacBooks, using built-in SSH from Terminal.

  • habibasseiss Level 1 Level 1

    Same problem here (10.7.2 MacBook White): Write failed: Broken pipe


    Changing options in ~/.ssh/config or /etc/ssh_config doen't work.

  • dr_khong Level 1 Level 1

    I have the same problems - dropped scp file transfers with a broken pipe on a MacBook with MacOsX 10.7.2. Setting the Server/Client-Timeouts didn't help. The proposed solution with syslogd doesn't work. There is no indication in the scp -v log either. Any ideas are welcome!

  • larrycz Level 1 Level 1

    After 1 day of testing I no longer experience this problem to such an obvious extent (so far it actually seems like it's fixed altogether). The net.inet.tcp.keepidle and net.inet.tcp.keepintvl variables were modified in /etc/sysctl.conf. Their values were extremely low. I don't know how this happened. The solution was to set these values to their default values net.inet.tcp.keepidle=7200000 and net.inet.tcp.keepintvl=75000 using the "sudo sysctl -w" command.

  • BobHarris Level 6 Level 6

    I do not have a /etc/sysctl.conf on my Lion nor my Snow Leopard system.


    Are you saying that your /etc/sysctl.conf was changed?


    Or that the default values for net.inet.tcp.keepidle and net.inet.tcp.keepintvl were too small without a /etc/sysctl.conf file.


    I found I could examine my sysctl values using


    sysctl -a | grep tcp.keep

    net.inet.tcp.keepidle: 7200000

    net.inet.tcp.keepintvl: 75000


    NOTE:  I get the same values for both Lion and Snow Leopard.


    All I'm asking is how your system got different values.  If you had a /etc/sysctl.conf file that got changed that would explain it.


    No matter what, it would be useful for anyone experiencing ssh disconnects to check their net.inet.tcp.keepidle and net.inet.tcp.keepintvl values.

  • amit_sharma Level 1 Level 1

    try this !!!


    I copied the folder from /Applications/Utilities  from a Macbook running Snow leopard or Leopard (dont remember which of two) and put it  in my personal folder on OS Lion. Running this version of Terminal seems to be doing fine.


    I am on ssh all day and the ssh connection would close on me every few hours.

    I have been running the Snow Leopard version of Terminal for about half a day and no drops so far.


    will update!!



  • mmarrow Level 1 Level 1

    I see the same issue.


    Changes that didn't help:

         Installing latest Xquartz

         Using iTerm instead of


    Changes that seem to have helped

         Using 'ssh -Y' rather than 'ssh -X'

         Don't tunnel the X connection through the ssh link (i.e. set DISPLAY on remote machine and xhost+ locally)


    Both modifications have security implications so use with care.

  • Scott DeLeury Level 2 Level 2

    The changes mentioned towards the bottom of this page by subq seem to have fixed this issue for me:



    12 hours+ and the issue has not resurfaced.  However, making these changes to your user's ssh config under your own account are more preferable due to future updates overwriting them if made in /private/etc/ssh_config.

  • Cornelius58 Level 1 Level 1

    I have not read the whole thread but this fix worked for me:



    A clean install of Lion also worked very well on one of my machines.  Had not droped yet.

  • rogerly Level 1 Level 1

    Ditto with the re-install.  I had to re-install Lion after a failed update to 10.7.3.  Previously, I had consistent problems with an SSH connection locking up and later dumping with a broken pipe on some remote servers after sitting with no use for more than 10 minutes.  Since then, the Dreamhost servers I connect to no longer exhibit this behavior.  Connections to an EC2 instance on AWS, however, still has the same problem. 


    Furthermore, this was a clean re-install with cherry-picked files copies over via Migration Assistant and Time Machine (not a clean restore directly from TM). 

  • LJMA Level 1 Level 1

    I am having this problem on a totally fresh install of Lion.  Get broken pipes to a whole bunch of very different servers when SSHing.  This is totally infuriating!!

  • mmarrow Level 1 Level 1

    Did you try 'ssh -Y server_name' ? That worked for me.