Skip to content

Commit

Permalink
Added support for TOTP password prompts, as used by google-authentica…
Browse files Browse the repository at this point in the history
…tor-libpam
  • Loading branch information
mburz committed Jul 3, 2023
1 parent 330375b commit cd73246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ v0.3.4.dev0
resource leaks.
* :gh:issue:`659` Removed :mod:`mitogen.compat.simplejson`, not needed with Python 2.7+, contained Python 3.x syntax errors
* :gh:issue:`983` CI: Removed PyPI faulthandler requirement from tests
* :gh:issue:`998` SSH: Added support for TOTP password prompts (i.e. 'Verification code: '), as used by google-authenticator-libpam

v0.3.3 (2022-06-03)
-------------------
Expand Down
6 changes: 5 additions & 1 deletion mitogen/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@
)

# sshpass uses 'assword' because it doesn't lowercase the input.
# 'password': standard password prompt
# 'verification code': TOTP prompt(as used by e.g. google-authenticator-libpam)
# These should also match 'password & verification code' for password and TOTP
# prompt (as used by e.g. google-authenticator-libpam)
PASSWORD_PROMPT_PATTERN = re.compile(
b('password'),
b('(password|verification code)'),
re.I
)

Expand Down

0 comments on commit cd73246

Please sign in to comment.