Netbeans SSH:无法连接到服务器...算法协商失败 - 如何修复?

Netbeans SSH: Cannot connect to server ... Algorithm negotiation fail - how to fix?

服务器提供以下调试输出。无论如何,似乎有通用算法我从 Netbeans 收到 "algorithm negotiation failed" 错误。从以下答案我知道可能是缺少算法的原因 (JSchException: Algorithm negotiation fail).

您知道出了什么问题以及如何解决吗?

Connecting to www.example.com port 19229
Connection established
Remote version string: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu1
Local version string: SSH-2.0-JSCH-0.1.49
CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
aes256-ctr is not available.
aes192-ctr is not available.
aes256-cbc is not available.
aes192-cbc is not available.
arcfour256 is not available.
CheckKexes: diffie-hellman-group14-sha1
diffie-hellman-group14-sha1 is not available.
SSH_MSG_KEXINIT sent
SSH_MSG_KEXINIT received
kex: server: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
kex: server: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256
kex: server: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
kex: server: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
kex: server: none,zlib@openssh.com
kex: server: none,zlib@openssh.com
kex: server:
kex: server:
kex: client: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1
kex: client: ssh-rsa,ssh-dss
kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
kex: client: none
kex: client: none
kex: client:
kex: client:
Disconnecting from ... port 19229
QUIT
Goodbye

终于在这里找到了答案:https://netbeans.org/bugzilla/show_bug.cgi?id=251641

Netbeans XXX 使用 JSch 库 XXX。可能需要更新的库。

1) 下载最新版本的 JSch 库 (http://www.jcraft.com/)

2) 将当前文件重命名为备份 C:\Program Files[当前 netbeans 文件夹]\ide\modules\com-jcraft-jsch.jar

3) 将下载的 com-jcraft-jsch.jar 版本 x.x 复制到此文件夹

4) 重启 Netbeans

宾果!! SSH 再次工作并与 OpenSSH x.x 服务器

一起工作