ssh, не работающий: Соединение закрывается удаленным хостом

Я использовал ssh ключ, но однажды внезапно он прекратил работать. Это - то, что я получаю, когда я пытаюсь клонироваться. Кроме того, в known_hosts файле нет ничего. Что я делаю?

sarthak@Sarthak:~/.ssh$ git clone git@github.com:sarthmit/Andrew-Ng-ML-solutions.git
Cloning into 'Andrew-Ng-ML-solutions'...
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

sarthak@Sarthak:~/Desktop/Web Scraping$ ssh -vvv git@github.com
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "github.com" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to github.com [192.30.253.113] port 22.
debug1: Connection established.
debug1: identity file /home/sarthak/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sarthak/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: ssh_exchange_identification: 

debug1: ssh_exchange_identification: 

debug1: ssh_exchange_identification: Error:  Must authenticate before using this service.


ssh_exchange_identification: Connection closed by remote host
4
задан 19 May 2017 в 18:42

2 ответа

debug1: Connecting to github.com [192.30.253.113] port 22.

Это не похоже на IP GitHub

debug1: ssh_exchange_identification: Error:  Must authenticate before using this service.

Это не идентификационная строка SSH.

Вы соединяетесь из-за некоторого прокси/брандмауэра, который препятствует тому, чтобы Вы использовали SSH. Необходимо говорить с администратором сети.

Или используйте HTTPS для клонирования репозиториев GitHub.

5
ответ дан 1 December 2019 в 09:32

Я получил точно ту же проблему.

192.30.253.113 IP GitHub без любой проблемы.

Для моего случая у меня есть "сервисное правило" фильтра в моей установке маршрутизатора, которая отключила порт 22 по некоторым причинам.

Можно попытаться проверить конфигурации маршрутизатора также.

0
ответ дан 1 December 2019 в 09:32

Другие вопросы по тегам:

Похожие вопросы: