3

До вчерашнего дня все работало нормально, и теперь я вдруг получаю эту ошибку, если набираю

ssh -D 9999 vivek@172.16.30.30
ssh_exchange_identification: Connection closed by remote host

Вот вывод:

OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.16.30.30 [172.16.30.30] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/adnan/.ssh/id_rsa" as a RSA1 public key
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/adnan/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/adnan/.ssh/id_rsa-cert type -1
debug1: identity file /home/adnan/.ssh/id_dsa type -1
debug1: identity file /home/adnan/.ssh/id_dsa-cert type -1
debug1: identity file /home/adnan/.ssh/id_ecdsa type -1
debug1: identity file /home/adnan/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

2 ответа2

1

Следующие строки могут вводить в заблуждение:

debug3: Could not load "/home/adnan/.ssh/id_rsa" as a RSA1 public key
debug2: key_type_from_name: unknown key type '-----BEGIN'

Исходя из опыта, я могу сказать, что эта проблема может быть вызвана конфигурацией сервера, даже если сообщения заставляют его выглядеть так, будто это проблема клиента. Конечно, вы также хотите проверить конфигурацию вашего клиента. Но если он работал и ничего на клиенте не изменилось, обязательно посмотрите на конфигурацию сервера, несмотря на вводящее в заблуждение сообщение об ошибке.

Например, я обнаружил, что если ваш пользователь не разрешен конфигурацией ssh на сервере, клиент ssh выдает точно такое же (вводящее в заблуждение) сообщение об ошибке.

sudo nano /etc/sshd_config
AllowUsers yourname@*
0

Попробуйте изменить тип ключа на 2 с опцией -2 .

ssh -2 -D 9999 vivek@172.16.30.30

Эта ошибка может возникнуть, если параметры командной строки неверны.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .