Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ssh connections dropping

since upgrading to lion ssh connections constantly drop with:

Write failed: Broken pipe


this did not happen in snow leopard, nor does it happen on win7 pro in parralels

apple terminal, zoc, and securecrt all experience the same thing


did apple change an idle timeout setting or something?

MacBook Pro, Mac OS X (10.7)

Posted on Aug 16, 2011 6:55 AM

Reply
38 replies

Aug 17, 2011 8:36 AM in response to blist

Hello,


I too am having the same issue, Write failed: Broken pipe on my ssh connections independent of server. This only happening since I upgraded to Lion, at first I thought it was my Internet Connection acting up, but my colleague here noticed the same thing only after upgrading to Lion everyone else still using Snow Leopard is fine.


I have just upgraded to 10.7.1 and still happening.


I also have under .ssh two files:


config and ssh_config with the contents:


Host *

ServerAliveInterval 120

ServerAliveCountMax 3


I have used just the file config on Snow Leopard and tried to use ssh_config in Lion to see if it resolved the issue but nothing changed...


P.S. - I'm using iTerm2 and was using it with Snow Leopard as well,. my friend just uses the Terminal that comes with OSX.


Thanks for any help on this.

Aug 17, 2011 9:00 AM in response to nsouto

I haven't tried changing the ssh config yet just because I haven't gotten around to it, however, running options at the cli when you make a connection should fix the problem.


ssh -o TCPKeepAlive=no -o ServerAliveInterval=15 username@remotehost


This does not fix meerkat from disconnecting and reconnecting all day long though if I am not actually tunneling traffic through it the whole time.


You could always fallback to actual tcp keep-alives but it generally isn't recommended.


SecureCRT NO-OP works as expected and that is what I have been doing for remote host ssh work. I can do ssh tunneling/port forwarding through SecureCRT as well but I prefer meerkat because I can just turn different tunnels on and off with a single click.


When I get some time I will probably adjust my local ssh config so that I don't have to type the options out everytime I make a connection. SecureCRT NO-OP will do in the meantime.


Hope that helps.

Aug 22, 2011 5:19 PM in response to blist

This Write failed: Broken pipe thing is driving me nuts. As I ssh into the linux server to to all of my work, whenever I try to display something a little bit graphics intensive, the ssh session become unresponsive and drop with the given error.


Would it be a problem with X11.app ? I have tried various version of OpenSSH (5.3 - 5.82p) but they're all the same

Aug 26, 2011 6:02 AM in response to blist

So I keep googling hoping someone will answer but non did. I actually installed virtualbox and have Xubuntu running then SSH and everything works fine 😟


So long story short - I keep googling and came to some forums post about Write failed: Broken pipeand apparently this could be because some logging issue from syslogd. You can do something to the com.apple.syslogd.plist as seen here http://dans.im/blog/archives/8 What I did was just move the whole file to the trash can. I think the ssh connection stop dropping now.

Sep 8, 2011 5:47 AM in response to blist

Stupid question. Is it possible that the DHCP IP address lease is turning over to quickly AND each time it is getting a new IP address.


If the Mac were getting a new IP address each time the DHCP lease needed to be renewed, that would break any TCP connection.


As an experiment, can anyone having this problem try switching to a manually assigned IP address and see if the problem continues?


Or write a script to capture the "ifconfig" information once a minute, and then see if the IP address has changed between when the ssh (or RealVNC) connection was made and when it received SIGPIPE.


#!/usr/bin/env bash

while sleep 60

do

ifconfig

done >ifconfig.history.txt


again, this is just a wild guess.

ssh connections dropping

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.