diff --git a/ProjectCode/Modules/Security/secharden-2fa.sh b/ProjectCode/Modules/Security/secharden-2fa.sh index f94352d..7b5584c 100644 --- a/ProjectCode/Modules/Security/secharden-2fa.sh +++ b/ProjectCode/Modules/Security/secharden-2fa.sh @@ -92,6 +92,11 @@ function configure_ssh_2fa() { sed -i 's/^ChallengeResponseAuthentication.*/ChallengeResponseAuthentication yes/' "$SSH_CONFIG" || \ echo "ChallengeResponseAuthentication yes" >> "$SSH_CONFIG" fi + + if ! grep -q "^KbdInteractiveAuthentication yes" "$SSH_CONFIG"; then + sed -i 's/^KbdInteractiveAuthentication.*/KbdInteractiveAuthentication yes/' "$SSH_CONFIG" || \ + echo "KbdInteractiveAuthentication yes" >> "$SSH_CONFIG" + fi # Enable PAM authentication if ! grep -q "^UsePAM yes" "$SSH_CONFIG"; then