
.ubuntuを使用してUbuntuサーバーに2段階認証(2FA)を設定していますlibpam-google-authenticator
。次の設定で、認証にPAMを使用するようにSSHを設定しました/etc/pam.d/sshd
。
auth required pam_unix.so nullok_secure
auth required pam_google_authenticator.so nullok
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
私の設定は次のとおりです/etc/ssh/sshd_config
。
ChallengeResponseAuthentication yes
PasswordAuthentication yes
UsePAM yes
AuthenticationMethods password,keyboard-interactive:pam
サーバーに SSH を接続すると、Google Authenticator に OTP を要求する前にパスワードを 2 回入力するように求められます。pam_google_authenticator.so
パスワードを尋ねてOTPで処理するようです。
パスワードを一度尋ねた後、Google OTPを尋ねると予想しました。
この問題が発生して解決策を見つけた人はいますか?
助けてくれてありがとう。