Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OpenSSH's BatchMode option #224

Closed
Zepmann opened this issue Mar 31, 2023 · 1 comment
Closed

Support OpenSSH's BatchMode option #224

Zepmann opened this issue Mar 31, 2023 · 1 comment

Comments

@Zepmann
Copy link

Zepmann commented Mar 31, 2023

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"
@Zepmann
Copy link
Author

Zepmann commented Mar 31, 2023

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.

stokito added a commit to stokito/dropbear that referenced this issue Dec 24, 2023
The BatchMode same as PasswordAuthentication=no but it has more priority.
So you can't re-enable the PasswordAuthentication like in:

    dbclient -v -o BatchMode=yes -o PasswordAuthentication=yes example.com

It also disables the interactive confirmation when a host key changed.

Close mkj#224
stokito added a commit to stokito/dropbear that referenced this issue Dec 24, 2023
The BatchMode same as PasswordAuthentication=no but it has more priority.
So you can't re-enable the PasswordAuthentication like in:

    dbclient -v -o BatchMode=yes -o PasswordAuthentication=yes example.com

It also disables the interactive confirmation when a host key changed.

Close mkj#224
@mkj mkj closed this as completed in cad0484 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants