I'm getting this error after entering a password when connecting via ssh from a Terminal window, ever since I followed these directions to reuse ssh connections:

"...consider appending the following to your ~/.ssh/config file:"

Host *
ControlPath ~/.ssh/master-%r@%h:%p
ControlMaster auto

What would cause the error in the title? This is on a current nightly, hrev46508, connecting to a CentOS 6.4 sshd.

3 Answers 3


It is failing to setup the socket in ~/.ssh/master-%r@%h:%p Check that the .ssh directory exists, that the permissions are correct, etc. It is also possible to get this error if a master connection already exists (the socket is present), but the socket has the wrong permissions, or if your new ssh client connection is trying to become the master (usually because its mode is not set to auto).

  • +1 for the first sentence, but unfortunately my problem was not solved. Actually I cannot duplicate the error on a current nightly but get a different error instead. I'll accept and open a new question.
    – Kev
    Jan 10, 2014 at 13:52

I found this question while researching similar issue. Turns out you get this error when using a version of OpenSSH that does not support ControlPath/Master settings, but include the lines you mention in your configuration.

In my case, I was running CentOS 6, which the included version of openssh is 5.3 (which was before they put the Control stuff in). Part of the fun of the Redhat/CentOS package cycle is that you run into things like this, since they tend to prefer backporting patches into old versions of major software instead of bringing in updated packages.

Anyway, to resolve you need to remove any ControlPath / ControlMaster entries from your ssh configuration (including ~/.ssh/config). Alternatively, you can download the latest OpenSSH package from their website and install that (but if you're going to be doing that kind of stuff regularly, you should consider using a non-Redhat/CentOS distro).


Although not the issue here, in my case my config included

ControlPath /home/barry/.ssh/tmp/%h_%p_%r

and I'd forgotten to create /home/barry/.ssh/tmp first.

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.