s sh -vT git@github.com kex_exchange_identification: соединение закрыто удаленным хостом - PullRequest
0 голосов
/ 11 января 2020

способ, которым я настраиваю ключ s sh, Я генерирую новый ключ s sh, добавляю в свой 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

что я могу сделать?

Ответы [ 2 ]

0 голосов
/ 12 января 2020

Если у вас есть только один ключ, попробуйте восстановить его с помощью старого формата PEM и без ключевой фразы, для тестирования:

ssh-keygen -t rsa -P "" -m PEM

Скопируйте содержимое id_rsa.pub в вашего профиля GitHub и попробуйте снова.

0 голосов
/ 11 января 2020

Я подозреваю, что в вашем ~/.ssh/ слишком много ключей. Укажите ssh на тот ключ, который вы используете. В ~/.ssh/config:

Host github.com
    User git
    HostName github.com
    IdentityFile ~/.ssh/id_rsa # or whatever key you use with Github

Затем попробуйте ssh -Tv git@github.com еще раз.

...