mwiede/jsch

failed to parse public key error with successful connection

Closed this issue · 3 comments

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

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