SSH Key Authentication is breaking in sshj-0.32.0 which worked in sshj-0.21.0 #843
-
Hi all, I was using the key authentication like below in sshj-0.21.0 & it worked. KeyProvider privateKey = ssh.loadKeys(privateKeyString, publicKeyString, null); However when I try to use the same code with sshj-0.32.0, it breaks with unexpected exception. It points to the public key but I am passing it correctly & it works in sshj-0.21.0 even with empty public key. Any help or pointers toward resolving it are appreciated. [16:07:02,497][ERROR] net.schmizz.sshj.transport.TransportImpl - Dying because - null |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Does it work with 0.35.0? That's the most recently released version. |
Beta Was this translation helpful? Give feedback.
-
@ptg1792 The stack trace with a NullPointerException references lines 20 of EdDSAPublicKeySpec, which corresponds to version 0.1.0. Version 0.2.0 and 0.3.0, which more recent versions of SSHJ use, changed the name for the curve. This means that version 0.1.0 of SSHJ has a direct dependency on eddsa 0.3.0, but it seems like the runtime class path is still referencing version 0.1.0. If you can track down the source of that library and make sure it is updated to version 0.3.0, that may solve the problem. |
Beta Was this translation helpful? Give feedback.
@ptg1792 The stack trace with a NullPointerException references lines 20 of EdDSAPublicKeySpec, which corresponds to version 0.1.0. Version 0.2.0 and 0.3.0, which more recent versions of SSHJ use, changed the name for the curve. This means that version 0.1.0 of
net.i2p.crypto:eddsa
is not compatible with recent versions of SSHJ, and could result in the stack trace with the NullPointerException.SSHJ has a direct dependency on eddsa 0.3.0, but it seems like the runtime class path is still referencing version 0.1.0. If you can track down the source of that library and make sure it is updated to version 0.3.0, that may solve the problem.