SSHでパスワード認証が無効になっていることを確認する

SSHで公開鍵認証にしてパスワード認証を無効に設定した後、確かにパスワード認証が無効になっていることを確認するため、あえてパスワード認証での接続を試行したい。

-o オプションで、PreferredAuthentications=passwordを指定する。

$ ssh -o PreferredAuthentications=password xxxx@example.com
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Permission deniedになればOK。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site uses Akismet to reduce spam. Learn how your comment data is processed.