【问题标题】:ssh not working, muxserver_listen bind(): No such file or directory [closed]ssh不工作,muxserver_listen bind():没有这样的文件或目录[关闭]
【发布时间】:2015-10-25 16:06:56
【问题描述】:

今天在我的新工作笔记本电脑上我根本无法使用 ssh(ssh 到服务器、bitbucket 等不工作),失败并出现以下错误:

致命:无法从远程存储库中读取。请做出来 确保您具有正确的访问权限并且存储库存在。

所以我开始调试,这是 ssh -Tv git@bitbucket.org 的输出:

debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([131.103.20.168]:22).
debug1: setting up multiplex master socket
muxserver_listen bind(): No such file or directory

不知道出了什么问题,我用过 ssh 几次,从来没有遇到过这个问题。顺便说一句,我正在使用 osx。

这个问题已经关闭了,但我认为SSH是日常开发中使用的工具,请考虑重新打开它

【问题讨论】:

    标签: git macos ssh terminal


    【解决方案1】:

    在尝试了很多不同的事情后,我发现我缺少这个文件夹 ~/tmp,我在查看这里后意识到这一点:/private/etc/ssh_config .我找到了这一行:

    StrictHostKeyChecking no
        ControlMaster auto
        ControlPath ~/tmp/ssh-mux-%h-%p-%r #THIS WAS THE PROBLEM
    

    所以之后:

    mkdir ~/tmp 
    

    一切都恢复正常。

    我想回答我自己的问题,因为我花了一些时间才找到这个。

    【讨论】:

    • 是的。可以回答你的问题。但不要忘记将其标记为解决方案。
    • 2天后做
    • 当%C(哈希)可用时,我个人更喜欢ControlPath ~/.ssh/.control-%C,否则更喜欢ControlPath ~/.ssh/.control-%h:%p:%r。这是一个安全且偏僻的地方(~/.ssh 必须具有严格的权限,必须存在 SSH 才能工作,并且 SSH 无论如何都会为您创建它)。将它们作为点文件使它们在运行时不显眼,例如ls ~/.ssh.
    • 我在使用 ssh 和连接共享时收到了类似的消息。只是为了消除任何混乱,这个目录(在我的例子中是~/.ssh/sockets/)需要存在于你正在 sshing 来自的机器上。我在目标机器上创建了它,但没有解决问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-22
    • 2018-03-10
    • 1970-01-01
    • 2021-04-22
    • 1970-01-01
    相关资源
    最近更新 更多