Blackbam
Blackbam

Reputation: 19376

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

The following debug output is provided by the server. There seem to be common algorithm anyway I get an "algorithm negotiation failed" error from Netbeans. From the following answer I know that probably a missing algorithm is the reason (JSchException: Algorithm negotiation fail).

Do you have an idea whats going wrong and how to fix?

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: [email protected],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: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
kex: server: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
kex: server: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
kex: server: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
kex: server: none,[email protected]
kex: server: none,[email protected]
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

Upvotes: 0

Views: 3216

Answers (1)

Blackbam
Blackbam

Reputation: 19376

The answer was finally found here: https://netbeans.org/bugzilla/show_bug.cgi?id=251641

Netbeans XXX uses JSch library XXX. A newer library may be required.

1) Download newest version of JSch library (http://www.jcraft.com/)

2) Rename current file to backup C:\Program Files[current netbeans folder]\ide\modules\com-jcraft-jsch.jar

3) Copy downloaded com-jcraft-jsch.jar of version x.x to this folder

4) Restart Netbeans

Bingo!! SSH works again and works with OpenSSH x.x servers

Upvotes: 1

Related Questions