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

时间:2016-05-30 08:45:24

标签: java netbeans ssh ide sftp

服务器提供以下调试输出。似乎有一个共同的算法无论如何我从Netbeans得到“算法协商失败”错误。从以下答案我知道可能缺少算法的原因(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

1 个答案:

答案 0 :(得分:0)

答案终于在这里找到: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)将下载的版本x.x的com-jcraft-jsch.jar复制到此文件夹

4)重启Netbeans

宾果!! SSH再次运行并与OpenSSH x.x服务器配合使用