症状
ちゃんと設定しているはずなのにパスワード認証で SSH 接続できてしまう。
原因
/etc/ssh/sshd_config.d/50-cloud-init.conf にある設定 PasswordAuthentication yes が sshd_config を上書きしていた。
no に書き換えたらいい感じ。
SSH 設定メモ
書き換える項目
Port <適当に変更> PermitRootLogin no PasswordAuthentication no
の 3 点。
サーバちゃんと設定しているはずなのにパスワード認証で SSH 接続できてしまう。
/etc/ssh/sshd_config.d/50-cloud-init.conf にある設定 PasswordAuthentication yes が sshd_config を上書きしていた。
no に書き換えたらいい感じ。
書き換える項目
Port <適当に変更> PermitRootLogin no PasswordAuthentication no
の 3 点。
コメント