Apple Event: May 7th at 7 am PT

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

Broken SSH client on Mavericks

I've read countless posts on broken SSH servers since the upgrade to Mavericks, but I'm having an issue with a broken SSH client. Every time I try to SSH to a remote server, after I type in my password, the prompt just hangs and I just see "Write failed: broken pipe".


I've found many alleged solutions that seem to indicate there are workaround involving decrypting and reincrypting keys and such, but these solutions seem to require using an encryption method that does not allow passwordless keys to work. So I've tried them anyway, using passwords for my new keys, and it still doesn't work. These are steps I used to try and fix it:


$ cd ~/.ssh
$ cp id_rsa id_rsa.bck
$ openssl rsa -in id_rsa -out id_rsa
$ openssl rsa -in id_rsa -aes256 -out id_rsa
$ chmod 0600 id_rsa
$ ssh-keygen -y -f id_rsa > id_rsa.pub


I still get "Write failed: broken pipe". I've tried playing with timeout settings and nothing's working.


Before I upgraded, I had zero problems with SSH whatsoever. All of my co-workers are having the same problem, which has gone uncorrected for weeks and it is hampering my work. How could a problem like this go undetected and ignored? We need a fix for this ASAP. This is crazy.

iMac, OS X Mavericks (10.9)

Posted on Nov 26, 2013 8:02 AM

Reply
38 replies

Dec 4, 2013 12:09 PM in response to marcelkraan

marcelkraan, the keep alive settings don't seem to have much impact on this for me, so I'm not sure this is a factor here. I will continue watching this thread in case you or anyone else finds a solution, but apparently, I am no longer allowed to post as everything I write is mysteriously being removed. I've certainly learned my lesson: no suggesting that people act civil... unless you have the points, I guess.

Dec 4, 2013 12:42 PM in response to impossibleplanet

For anyone still questioning, for whatever reason, whether this is anything but a Mavericks issue, let's put that to bed now:


  • I am able to connect to the remote server with PuTTY in my Windows 7 VM, running in VirtualBox... on my Mac. So it's NOT a network issue.
  • Because of above, it is also NOT a server issue.
  • I've tried it in Terminal and iTerm, so it is NOT a client app issue.
  • I've tried it with the included ssh and brew-sourced opensssh clients so it is NOT an SSH issue.
  • I've tried it with other existing user accounts and brand spanking new user accounts. So it is NOT a bad key issue.
  • Because of the above it is NOT a user account issue
  • I've tried re-installing Mavericks, so it is NOT a bad upgrade issue.
  • The problem did not occur on Mountain Lion, so it is NOT a hardware issue.
  • I have two co-workers with the same problem so it is NOT user error.


This is without a doubt a Mavericks issue. Like many bugs, just because it's not experienced by everyone, doesn't mean it doesn't exist.

Dec 4, 2013 2:46 PM in response to impossibleplanet


impossibleplanet wrote:


For anyone still questioning, for whatever reason, whether this is anything but a Mavericks issue, let's put that to bed now:


Sorry, still awake.


  • I am able to connect to the remote server with PuTTY in my Windows 7 VM, running in VirtualBox... on my Mac. So it's NOT a network issue.
  • Because of above, it is also NOT a server issue.

There are vast differences between one ssh implementation and another, let alone one OS and another. Networks, espeically secure ones, can be complicated.


I've tried it in Terminal and iTerm, so it is NOT a client app issue.

The GUI application running the ssh client is irrelevant.

I've tried it with the included ssh and brew-sourced opensssh clients so it is NOT an SSH issue.

Correct. That is because it is a network or server issue.


I've tried it with other existing user accounts and brand spanking new user accounts. So it is NOT a bad key issue.

No, because your partial debut output is post-authentication.


I've tried re-installing Mavericks, so it is NOT a bad upgrade issue.

Reinstalling applications or OS builds will not fix misconfiguration on another machine.


I have two co-workers with the same problem so it is NOTuser error.

No. It is IT error - far more common..


Like many bugs, just because it's not experienced by everyone, doesn't mean it doesn't exist.

Correct. But think about that for a bit. If the bug is on the server side, your statement is still true.


Just because something works in one particular configuration doesn't mean it was implemented correctly. The one and only way to debug this problem is by looking at both the client and the server. If you have found a Mavericks bug and can reproduce it, then file a bug report. But you haven't demonstrated that yet. I have demonstrated that Linux misconfigurations can produce identical symptoms to what you are seeing. That occurs in environments with no Macs involved and has been reported for years. You haven't encountered the bug year simply because you haven't encountered it yet. Now, with Mavericks, you have. You need to work with your IT department to track the the likely causes of this bug and look for solutions. You could eliminate the one new configuration where the bug is exposed. Or you could fix it. I suggest fixing it because any future change, even if you dump your Macs, could trigger the problem at some point in the future. The best, and, in fact, only way to identify and fix these problems is when it is sitting right in front of you. Mavericks have given you that opportunity.

Jan 13, 2014 4:29 PM in response to impossibleplanet

I am having the same problem as impossibleplanet since I upgraded my laptop to Mavericks, but interestingly the phenomenon is only occurring when I try to ssh to one particular server that is running Snow Leopard. I can connect to several Linux servers fine (and even one super old Tiger(!) server lets me ssh in just fine). No updates or changes have been made to the Snow Leopard server since this problem started - my upgrade to Mavericks is the only change since this started happening. Any input, tips, or feedback is welcomed!

Feb 15, 2014 11:46 PM in response to impossibleplanet

I have been sufferring with this for weeks. I narrowed this issue to combination of OpenSSH client (Mac OS X/MacPort/Linux) and my Asus AC68U router. I am able to access hosts using putty though with same router. Also, I am able to access hosts using OpenSSH client over my Note 3 Hotspot.


Solution: Use MacPort putty(plink) and ssh-agent (for password-less login)


Its not a 100% fix as plink command is not 100% compatible with ssh command, but its still a life saver

Mar 14, 2014 5:17 AM in response to impossibleplanet

Have you tried clearing the host key for the server in question?


In terminal:


ssh-keygen -R <ip-address>


<ip-address> being the IP of the server you are trying to connect to.


When you next try to connect again you will get a prompt to save the new / updted host key.


A changed host key will cause the same error sequence you are showing, the connection just dies with no error message given.

Apr 25, 2014 4:29 PM in response to impossibleplanet

I am having exactly the same issues, I get a message saying "Write failed: Broken pipe" after succesfully entering my password when using Terminal.

I have no problems using PuTTY with wine, ubuntu terminal (virtualbox) or booting into windows and using PuTTY there.


The problem seems to lie with the Terminal app in Mavericks. I also have a hackintosh that works fine with the terminal running Mountain Lion, I updated to Mavericks and immediatly faced the same problems as with my MacBook.


I have tried all the suggestions with keep alive settings and what not.


It seems strange that PuTTY would work but the built in Terminal won't.


I have the same problem with several servers I own, from VPS, dedicated, Amazon EC2 and even when logging into CISCO routers over SSH. All with various distributions of Linux.


In my opinion this problem lies with the Terminal app/Mavericks.

Apr 25, 2014 5:02 PM in response to TJN93

TJN93 wrote:


I have the same problem with several servers I own, from VPS, dedicated, Amazon EC2 and even when logging into CISCO routers over SSH. All with various distributions of Linux.


In my opinion this problem lies with the Terminal app/Mavericks.

Terminal is just a shell app. It has no relation to ssh at all. It sounds like you have made some system change on your Mac that has rendered it inoperable. When Linux users switch to the Mac they tend to bring some Linux habits with them, such as updating system compontents to more recent versions. That never ends well.

May 5, 2014 10:29 AM in response to etresoft

Hi there. I have the same problem, and it definetely started with Maverick. All of the sudden I could not scp any files, my ssh connections got stalled. I tried the keep alive configuration mentioned earlier on, and this makes ssh / scp usable, but extremely slow. I have compared this to using a linux box and or cygwin, and there I have no problems.

Broken SSH client on Mavericks

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