Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@e4487af
The root cause was discovered to be the ssh private key mismatch. The exception only happened for users with key of newer kind ed25519, which outputs this key header:
-----BEGIN OPENSSH PRIVATE KEY-----
instead of kind RSA:
-----BEGIN RSA PRIVATE KEY-----
regenerating an RSA key (ssh-keygen -t rsa
), made the exception go away.
If you have OpenSSH 7.8
and above you might need to add -m PEM
to the generation command:
ssh-keygen -t rsa -m PEM