the way I config the ssh-key,我生成了一个新的ssh密钥,添加到我的github中,但有些地方不对劲,我尝试了很多方法,但我不能。
$ ssh -vT git@github.com
OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [111.40.234.2] port 22.
debug1: Connection established.
debug1: identity file /c/Users/dell/.ssh/id_rsa type 0
debug1: identity file /c/Users/dell/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/dell/.ssh/id_dsa type -1
debug1: identity file /c/Users/dell/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/dell/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/dell/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/dell/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/dell/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/dell/.ssh/id_xmss type -1
debug1: identity file /c/Users/dell/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
kex_exchange_identification: Connection closed by remote host
我能做什么呢?
3条答案
按热度按时间gzszwxb41#
我怀疑您的
~/.ssh/
中有太多的密钥。将ssh
指向您使用的确切密钥。在~/.ssh/config
中:然后重试
ssh -Tv git@github.com
。hyrbngr72#
如果您只有一个密钥,请尝试使用the old PEM format重新生成密钥,但不使用密码短语进行测试:
将
id_rsa.pub
的内容复制到您的GitHub档案中,然后重试。uyto3xhc3#
我猜你在你的网络中使用了一个vpn,并且vpn可能已经禁用了端口22,所以你需要取消vpn的使用或者将github连接更改为端口443。
编辑
~/.ssh/config
文件并保存再次测试