Windows でリモートから SSH 接続すると Kex エラーが発生する

Windows でリモートから SSH 接続すると Kex エラーが発生する

私はWindows10に組み込まれているsshサーバー/クライアントを使用しようとしています。またはを
実行するとsshは正常に開きます(キーベースの認証を使用しています) ssh localhostssh user@local_IP_address

今、ルーターのポート22をポート転送し、外部IP経由でsshにアクセスしようとしています -

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

Diffie-Hellman groupPuttyを使用して接続しようとしましたが、kexアルゴリズムを1が最後になるように並べ替えても同様のエラーが発生します。

putty kex エラー

エラーメッセージには

ECDH 応答を期待しているときに予期しないパケットを受信しました。タイプ 30 (SSH2_MSG_KEX_ECDH_INIT)

答え1

まれに、Microsoft Security Essentials または Windows ファイアウォールが原因で、SSH 接続インターフェイスとしての putty が失敗することがあります (主に仮想マシンの場合)。このエラーは、構成する必要があるソリューションがあるためです。ただし、タイプ エラー文字列については、Kex プロトコル エラー: タイプ 30 シーケンス 1 です。このエラーは、Diffie-Hellman グループ交換 KEX によって定義されていると思われます。KEX は絶対的なものなので、SSH を使用するにはクライアントとサーバーの両方で更新する必要があります。さらに、ソフトウェアとして一部の putty ターミナルを更新する必要があります。次の情報が役立ちます。 http://forum.filezila-project.org/viewtopic.php?t=37469 https://github.com/michaellukashov/Far-NetBox/issues/156

関連情報