rundeck-plugins / sshj-plugin

SSH Node Executor and Field Copier using SSHJ
0 stars 2 forks source link

Request: Log error message on wrong passphrase #10

Open mchubby opened 1 year ago

mchubby commented 1 year ago

Currently, authentication fails when providing a wrong passphrase to unlock a private key. However, it only fails at connection time with cryptic message "Failed: Unknown; Exhausted available authentication methods" in the job output.

Toggling verbose logging on says [net.schmizz.ssj.userauth.method.AuthPublickey] Attempting authentication using com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyV1KeyFile@some-identifier

Maybe prior to that, one of the methods to read the private/public key, such as readDecodedKeyPair() should be called at least once in the initialization process to ensure the key pair can actually be used with the provided passphrase? And then, log an error in the log output.

Or, file an upstream issue to obtain more helpful messages?