leftwukaixing
昵称居然已经存在了
采纳率100%
2018-07-03 05:36

ssh_exchange: read: Connection reset by peer

5
已采纳

git clone 时报错:ssh_exchange_identification: read: Connection reset by peer

可以ssh访问远程服务器,能访问其他的类git,就是访问github的时候会报错。我确定已经把public key上传到github了。

从网上找了各种办法,尝试结果均无效。希望各路大神能帮忙解决一下。

 ssh -T git@github.com -vvv
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /Users/XXX/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to github.com [192.30.253.112] port 22.
debug1: Connection established.
debug1: identity file /Users/XXX/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/XXX/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: read: Connection reset by peer

ssh-add -l
2048 SHA256:og75aUEa+XXXXXX+CQ6HdvIj8yk6E/A9KFQ /Users/left/.ssh/id_rsa (RSA)
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • weixin_30367359 Easygoing_ben 3年前

    Connection reset by peer 连接被重置,一般是网络问题,特别是公司网络内,很多公司为了资料外流,会对有存储功能的网址或者操作进行控制
    可以咨询下网管

    点赞 1 评论 复制链接分享
  • jieisme basecoding 3年前

    从日志上看,密钥还是不对呢。确认一下copy是否有问题,还有当前用户名是否一致。

    点赞 评论 复制链接分享

为你推荐