Raspberry Pi OS SSH経由のGoogle 2FAは引き続きパスワードとOTPを要求します。

Raspberry Pi OS SSH経由のGoogle 2FAは引き続きパスワードとOTPを要求します。

私はこのガイドに従いました。https://pimylifeup.com/setup-2fa-ssh/ただし、接続しようとすると、次のような結果が表示されます(ループに陥り、パスワードとキーの入力を続けます)。

ssh [email protected]                                
([email protected]) Password: 
([email protected]) Verification code: 
([email protected]) Password: 
([email protected]) Verification code: 
([email protected]) Password: 
([email protected]) Verification code: 
[email protected]'s password: 

コードが正しいか間違っていると、これが発生します。そうでない場合は問題になりません。パスワードが間違っている場合は、再入力するように求められます。 (認証番号なし)

ベストアンサー1

私にもこのようなことが起こりました。

私は実行しないことで問題を解決しました。

sudo google-authenticator

SSHに必要なユーザーとしてログインしていることを確認したら、次のようにします。

google-authenticator

ヒントは次の行から来ます。

"/root/.google_authenticator"ファイルを更新しますか?(y / n)"

次のように話す必要があります。

""/home/[youruser]/.google_authenticator"ファイルを更新しますか?(y/n)"

おすすめ記事