
Я пытаюсь использовать встроенный SSH-сервер/клиент на Windows 10:
SSH открывается нормально, когда я запускаю ssh localhost
или ssh user@local_IP_address
(я использую аутентификацию на основе ключей)
Теперь я перенаправил порт 22 на своем маршрутизаторе и пытаюсь получить доступ по SSH через внешний IP-адрес -
ssh user@remote_IP_address
я получил
ошибка протокола kex: тип 30 seq 1
когда я бегу
ssh user@remote_IP_address -vv
я получил
OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
debug2: resolving "domain" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to domain [domain] port 22.
debug1: Connection established.
debug1: identity file C:\Users\Asus/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\Asus/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_7.6
debug1: match: OpenSSH_for_Windows_7.6 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to domain as 'asus'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: [email protected]
debug1: kex: server->client cipher: [email protected] MAC: compression: none
debug1: kex: client->server cipher: [email protected] MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
kex protocol error: type 30 seq 1
debug1: Received SSH2_MSG_UNIMPLEMENTED for 1
Я пробовал использовать putty для подключения и получаю похожую ошибку, даже когда я переставляю алгоритмы kex так, что Diffie-Hellman group
1 оказывается последним.
в сообщении об ошибке говорится
Получен неожиданный пакет при ожидании ответа ECDH, тип 30 (SSH2_MSG_KEX_ECDH_INIT)
решение1
Редкие случаи, в основном с виртуальными машинами, когда putty как интерфейс SSH conexión не работает из-за Microsoft Security Essentials или брандмауэра Windows, чтобы иметь решение, которое должно быть настроено, однако, что касается строки ошибки типа: Ошибка протокола Kex: тип 30 seq 1 Ошибка предположительно определяется групповым обменом Диффи-Хеллмана KEX является абсолютным, поэтому должен быть обновлен как на клиенте, так и на сервере для использования SSH, кроме того, некоторые терминалы putty как программное обеспечение должны быть обновлены. Следующая информация может помочь: http://forum.filezila-project.org/viewtopic.php?t=37469 https://github.com/michaellukashov/Far-NetBox/issues/156