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

github 无法通过 ssh 协议链接

  •  
  •   sfyumi ·
    sfyumi · 2017-03-13 17:37:20 +08:00 · 2586 次点击
    这是一个创建于 2601 天前的主题,其中的信息可能已经有所发展或是发生改变。

    前几天还能直接 clone github ssh 协议的 git repo, 今天忽然不行了.

    ssh -Tv [email protected]
    

    一直无法认证

    OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
    debug1: Reading configuration data /home/ychen/.ssh/config
    debug1: /home/ychen/.ssh/config line 6: Applying options for github.com
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to github.com [1.111.11.111] port 22.
    debug1: Connection established.
    debug1: identity file /home/ychen/.ssh/id_rsa.github.pub type 1
    debug1: key_load_public: No such file or directory
    debug1: identity file /home/ychen/.ssh/id_rsa.github.pub-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
    ssh_exchange_identification: Connection closed by remote host
    

    github 的 ssh 不会是跪了吧?

    第 1 条附言  ·  2017-03-14 10:44:35 +08:00
    github 的 ip 不知道为什么解析成 1.111.11.111 了, 配了 hosts 好了
    9 条回复    2017-03-13 21:52:24 +08:00
    winterbells
        1
    winterbells  
       2017-03-13 17:49:12 +08:00
    key_load_public: No such file or directory
    这个问题?
    sfyumi
        2
    sfyumi  
    OP
       2017-03-13 17:51:24 +08:00
    @winterbells 不是的, 我测试公司内部的 git 服务器也显示 key_load_public: No such file or directory, 但是可以正常 clone
    l1093178
        3
    l1093178  
       2017-03-13 18:21:35 +08:00
    ip 不对吧

    ~~~
    ; <<>> DiG 9.8.3-P1 <<>> github.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65197
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;github.com. IN A

    ;; ANSWER SECTION:
    github.com. 287 IN A 192.30.253.112
    github.com. 287 IN A 192.30.253.113
    ~~~
    Love4Taylor
        4
    Love4Taylor  
       2017-03-13 18:44:16 +08:00 via Android
    1.111.11.111 这 IP 不对吧
    wlsnx
        5
    wlsnx  
       2017-03-13 18:45:45 +08:00
    1.111.11.111
    这个是 IP 靓号?
    sfyumi
        6
    sfyumi  
    OP
       2017-03-13 19:32:23 +08:00
    @l1093178 没配过 host 什么的, 我再检查检查原因. 我 ping github.com 也返回 1.111.11.111 这个 ip
    sfyumi
        7
    sfyumi  
    OP
       2017-03-13 19:40:54 +08:00
    @Love4Taylor @l1093178 @winterbells @wlsnx ok 了. 是我的 github 解析的 ip 错了, 不知道为什么解成 1.111.11.111 了. 我直接把 github 的 ip 配成 192.30.253.112 就 ok 了. 等以后再看看为什么会解析成 1.111.11.111 这么靓的 ip 好了
    winterbells
        8
    winterbells  
       2017-03-13 21:49:31 +08:00
    @sfyumi 我以为是你打的码(・□・、*)
    以为是用你自己的反代...
    think2011
        9
    think2011  
       2017-03-13 21:52:24 +08:00
    IP 靓号 哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2842 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:02 · PVG 20:02 · LAX 05:02 · JFK 08:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.