[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable passphrase querying

On Fri, 2020-03-27 at 13:59 +0100, Maximiliano Pin wrote:
> Hi all,
> I'm using ssh_userauth_publickey_auto(). I'd like to disable the
> "Enter PEM
> pass phrase:" prompt that appears when the user forgot to use ssh-add 
> (the
> private key is encrypted), and get an error instead.
> This is a program with multiple threads doing non-interactive ssh
> communication, so that prompt is a problem.
> With the 'ssh' command, I can achieve that using the BatchMode
> option. How
> can I achieve the same with libssh? Thanks!

You should be able to set auth_function callback. It can be either your
prompt for passphrase or just bogus function returning empty
passprahse, which will let libssh fail to decode the encrypted key and
the connection.


Jakub Jelen
Senior Software Engineer
Security Technologies
Red Hat, Inc.

Re: Disable passphrase queryingMaximiliano Pin <mxcpin@xxxxxxxxx>
Disable passphrase queryingMaximiliano Pin <mxcpin@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org