Closed a-tinker closed 8 months ago
Hi @a-tinker,
The byte[] pubkey
argument you are passing to the JSch.addIdentity()
would appear to be an empty array instead of a an actual ssh public key string.
Thanks, Jeremy
Thanks Jeremy. It has helped and resolved.
Resolved
I am able to establish successful connection and then receiving "failed to parse public key" error with following stack trace: failed to parse public key java.lang.ArrayIndexOutOfBoundsException: 0 at com.jcraft.jsch.KeyPair.load(KeyPair.java:1015) at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:44) at com.jcraft.jsch.JSch.addIdentity(JSch.java:524) at