For a fairly simple application, which mainly depends on ssh connections created through JSch, I wanted to ask for a passphrase on the login screen, try to decrypt the private key, and if not, return to the login window.
I could not find a way to find out if the call
jsch.addIdentity(keyfile, prvkey, pubkey, passphrase);
ended correctly, even if I see in the code that the decryption has already been verified, and I believe that he already knows that the code phrase is incorrect.
Is there any way to define a passphrase before trying to establish a session?
Thanks.
source share