即使我設定了“PasswordAuthentication no”,SSH 也允許我使用密碼登入

即使我設定了“PasswordAuthentication no”,SSH 也允許我使用密碼登入

我試圖在設定公鑰存取後關閉 SSH 的密碼身份驗證。我在 /etc/ssh/sshd_config 檔案中設定了這些:

PermitRootLogin without-password
PasswordAuthentication no
ChallengeResponseAuthentication no

但是,它仍然允許我使用密碼登入。

答案1

我忘記重新啟動 sshd,因此它沒有使用新設定。這修復了它:

/etc/rc.d/sshd restart

相關內容