Update sshd_config

without-password is a deprecated alias, use prohibit-password instead
This commit is contained in:
Xiufeng Guo 2024-06-12 04:52:06 +09:00
parent b6da0d6f97
commit 5cb1537702
Signed by: showfom
GPG Key ID: 29A7777777777777

View File

@ -201,7 +201,7 @@ function disable_ssh_password() {
echo 'DebianBanner no' >> /etc/ssh/sshd_config
else
cat > /etc/ssh/sshd_config.d/disable_password.conf << EOF
PermitRootLogin without-password
PermitRootLogin prohibit-password
PasswordAuthentication no
EOF
cat > /etc/ssh/sshd_config.d/hide_debian_banner.conf << EOF