This commit is contained in:
luk
2024-05-09 20:01:04 +08:00
parent 3035d92ac6
commit c0b8ce4ced
2 changed files with 2 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ then
echo "=== Deny root login: PermitRootLogin no"
sed -i "s|PermitRootLogin |#PermitRootLogin |g" /etc/ssh/sshd_config && echo 'PermitRootLogin no' >> /etc/ssh/sshd_config
echo "=== Allow password login: PasswordAuthentication yes"
sed -i "s|PasswordAuthentication |PasswordAuthentication |g" /etc/ssh/sshd_config && echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
sed -i "s|PasswordAuthentication |#PasswordAuthentication |g" /etc/ssh/sshd_config && echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
service sshd restart
echo
fi