dropbear
dropbear copied to clipboard
Support OpenSSH's BatchMode option
Useful for scripting and not getting stuck on a password prompt (in case a key has not been configured correctly on the side of the client or server).
From ssh_config(5):
BatchMode If set to ''yes'', passphrase/password querying will be disabled. This option is useful in scripts and other batch jobs where no user is present to supply the password. The argument must be ''yes'' or ''no''. The default is ''no''.
Example usage:
dbclient -oBatchMode=yes user@whatever "echo yes"
A not-so-nice workaround until support for disabling password authentication is added to dbclient:
DROPBEAR_PASSWORD="" dbclient user@whatever "echo yes"
This is 'dirty' since the server will register this as a failed password authentication attempt if public key authentication fails.