Add support for keyboard-interactive authentication#244
Open
zyga wants to merge 1 commit intocanonical:masterfrom
Open
Add support for keyboard-interactive authentication#244zyga wants to merge 1 commit intocanonical:masterfrom
zyga wants to merge 1 commit intocanonical:masterfrom
Conversation
0c1ffa7 to
4e5167f
Compare
This makes spread able to authenticate to systems that do not allow plaintext passwords but DO allow keyboard-interactive authentication. Some newer systems use such method as there are some PAM interactions that prevent plaintext passwords from working (Gentoo). Fixes: canonical#243 Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
4e5167f to
01484eb
Compare
bboozzoo
reviewed
Jun 30, 2025
Comment on lines
+46
to
+48
| if questions[i] == "Password: " { | ||
| answers[i] = password | ||
| } |
Contributor
There was a problem hiding this comment.
is this part driven by PAM?
Contributor
Author
There was a problem hiding this comment.
I presume it is. Gentoo ships those override files in their images:
root@gentoo /etc/ssh/sshd_config.d # ls -la
total 12
drwxr-xr-x 2 root root 128 Jun 22 23:57 .
drwxr-xr-x 4 root root 291 Jul 1 07:17 ..
lrwxrwxrwx 1 root root 61 Jun 22 23:56 20-systemd-userdb.conf -> ../../../usr/lib/systemd/sshd_config.d/20-systemd-userdb.conf
-rw------- 1 root root 316 Jun 1 19:22 9999999gentoo.conf
-rw------- 1 root root 133 Jun 1 19:22 9999999gentoo-pam.conf
-rw------- 1 root root 79 Jun 1 19:22 9999999gentoo-subsystem.conf
root@gentoo /etc/ssh/sshd_config.d # cat 9999999gentoo*
# Allow client to pass locale environment variables (bug #367017)
AcceptEnv LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LANGUAGE LC_ADDRESS LC_IDENTIFICATION LC_MEASUREMENT LC_NAME LC_PAPER LC_TELEPHONE
# Allow client to pass COLORTERM to match TERM (bug #658540)
AcceptEnv COLORTERM
UsePAM yes
# This interferes with PAM.
PasswordAuthentication no
# PAM can do its own handling of MOTD.
PrintMotd no
PrintLastLog no
# override default of no subsystems
Subsystem sftp /usr/lib64/misc/sftp-server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes spread able to authenticate to systems that do not allow plaintext passwords but DO allow keyboard-interactive authentication. Some newer systems use such method as there are some PAM interactions that prevent plaintext passwords from working (Gentoo).
Fixes: #243