git - ssh_exchange_identification: Connection closed by remote host 报错
天蓬老师
天蓬老师 2017-05-02 09:38:57
0
1
1510

github is inexplicably unable to push code,

Error report:

fatal: unable to access 'https://***.git/': SSL peer handshake failed, the server most likely requires a client certificate to connect

Regenerate the ssh key according to the official documentation. And execute ssh -T git@github.com after adding it. Error:
ssh_exchange_identification: Connection closed by remote host

The code to execute ssh -vT git@github.com is as follows:

$ ssh -vT git@github.com
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to github.com [1.111.11.111] port 22.
debug1: Connection established.
debug1: identity file /Users/yangzhongjing/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/yangzhongjing/.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: Connection closed by remote host

Here/Users/yangzhongjing/.ssh/id_rsa this file exists. I don’t know why it reports: key_load_public: No such file or directory

I searched a lot online and tried the following methods but to no avail:

  • vim /etc/hosts.allow Add sshd: ALL

  • ssh-add ~/.ssh/id_rsa

  • Adjusted the /etc/ssh/sshd_config in MaxSessions 10 to make it bigger

  • Delete ~/.sshDirectory and regenerate ssh key

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
大家讲道理

The problem of router acceleration plug-in has been solved..

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template