ssh git kex_exchange_identification: 读取:对等方重置连接
ssh git kex_exchange_identification: read: Connection reset by peer
几天前一切正常。现在 ssh -T git@gitlab.com
和 ssh -T git@github.com
给我相同的输出 kex_exchange_identification: read: Connection reset by peer
.
我尝试了互联网上的一些建议,但没有成功。
我正在使用 Ubuntu 20.04 和 git 版本 2.25.1
ssh -Tv git@gitlab.com
给出这个输出
OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to gitlab.com [172.65.251.78] port 22.
debug1: Connection established.
debug1: identity file /home/fazar/.ssh/id_rsa type 0
debug1: identity file /home/fazar/.ssh/id_rsa-cert type -1
debug1: identity file /home/fazar/.ssh/id_dsa type -1
debug1: identity file /home/fazar/.ssh/id_dsa-cert type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/fazar/.ssh/id_ed25519 type -1
debug1: identity file /home/fazar/.ssh/id_ed25519-cert type -1
debug1: identity file /home/fazar/.ssh/id_ed25519_sk type -1
debug1: identity file /home/fazar/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/fazar/.ssh/id_xmss type -1
debug1: identity file /home/fazar/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3
kex_exchange_identification: read: Connection reset by peer
检查您的 ssh 配置,如 gitlab-org/gitlab
issue 121570
I found out that the port in my /etc/ssh/ssh_config file was accidentally changed.
Once I changed the port in /etc/ssh/ssh_config
back to 22, I was able to connect to Gitlab.
尝试 ssh -Tv git@gitlab.com
查看更多。
OP Fazar confirms in 从 git 2.25 升级到 2.33 足以解决问题。
几天前一切正常。现在 ssh -T git@gitlab.com
和 ssh -T git@github.com
给我相同的输出 kex_exchange_identification: read: Connection reset by peer
.
我尝试了互联网上的一些建议,但没有成功。 我正在使用 Ubuntu 20.04 和 git 版本 2.25.1
ssh -Tv git@gitlab.com
给出这个输出
OpenSSH_8.2p1 Ubuntu-4ubuntu0.3, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to gitlab.com [172.65.251.78] port 22.
debug1: Connection established.
debug1: identity file /home/fazar/.ssh/id_rsa type 0
debug1: identity file /home/fazar/.ssh/id_rsa-cert type -1
debug1: identity file /home/fazar/.ssh/id_dsa type -1
debug1: identity file /home/fazar/.ssh/id_dsa-cert type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/fazar/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/fazar/.ssh/id_ed25519 type -1
debug1: identity file /home/fazar/.ssh/id_ed25519-cert type -1
debug1: identity file /home/fazar/.ssh/id_ed25519_sk type -1
debug1: identity file /home/fazar/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/fazar/.ssh/id_xmss type -1
debug1: identity file /home/fazar/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3
kex_exchange_identification: read: Connection reset by peer
检查您的 ssh 配置,如 gitlab-org/gitlab
issue 121570
I found out that the port in my /etc/ssh/ssh_config file was accidentally changed.
Once I changed the port in/etc/ssh/ssh_config
back to 22, I was able to connect to Gitlab.
尝试 ssh -Tv git@gitlab.com
查看更多。
OP Fazar confirms in