V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
kaixuan1901
V2EX  ›  SSH

无法通过域名 SSH 连接

  •  
  •   kaixuan1901 · 2020-04-25 17:47:42 +08:00 · 5505 次点击
    这是一个创建于 1453 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近使用 SSH 碰过一个奇怪的问题,通过 IP 可以直接 SSH 登录,但用域名会卡在 connecting 的地方。

    • 正常登录
    ssh -p 11200 [email protected]
    
    • 无法登录
    ssh -p 11200 -v [email protected]
    OpenSSH_8.1p1, LibreSSL 2.7.3
    debug1: Reading configuration data /Users/user/.ssh/config
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 47: Applying options for *
    debug1: Connecting to host.abc.com port 11200.
    

    第一反应是 DNS 有问题导致域名无法解析,但 ping 域名能正常解析出 IP 地址,所以 DNS 应该是没问题的。请教一下哪位大大知道可能是什么原因导致的?

    第 1 条附言  ·  2020-04-28 11:21:02 +08:00

    通过重新安装 openssl 解决了这个问题。 brew install openssl

    结果今天使用 ansible 的时候出现了另外一个问题。

    ERROR:root:code for hash md5 was not found.
    ...
    

    然后通过下面的方面解决:

    $ ls /usr/local/Cellar/openssl
    1.0.2s
    
    $ brew switch openssl 1.0.2s
    
    3 条回复    2020-04-25 18:31:38 +08:00
    celeron533
        1
    celeron533  
       2020-04-25 18:04:41 +08:00   ❤️ 1
    苹果最新系统好像有这个问题,网上有人提到过
    xmoon
        2
    xmoon  
       2020-04-25 18:29:04 +08:00 via Android   ❤️ 1
    如果是 macos 最新版的话 是有这么一个 bug
    kaixuan1901
        3
    kaixuan1901  
    OP
       2020-04-25 18:31:38 +08:00
    @celeron533
    @xmoon
    感谢提醒,原来是 MacOS 系统的锅,根据你们提示已找到解决方法,安装新版本的 `openssh`

    ```
    brew install openssh
    ```
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3554 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:09 · PVG 08:09 · LAX 17:09 · JFK 20:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.