From 9e918e964b39fe5f8596fd4f8dc8fd081ed94694 Mon Sep 17 00:00:00 2001 From: Xiufeng Guo Date: Thu, 4 Jul 2024 21:57:19 +0900 Subject: [PATCH] Update debian.sh --- debian.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/debian.sh b/debian.sh index 7affd10..d4b7a83 100644 --- a/debian.sh +++ b/debian.sh @@ -178,14 +178,6 @@ function disable_ssh_password() { echo '### Disable SSH password ###' printf "\E[0m" -# codename=$(lsb_release -sc) -# -# if [ "$codename" == "buster" ]; then -# cp -r /etc/ssh/sshd_config /etc/ssh/sshd_config.$(date +"%Y_%m_%d_%I_%M_%p").bak -# sed -i -E 's/#?PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config -# sed -i -E 's/#?PermitRootLogin.*/PermitRootLogin without-password/' /etc/ssh/sshd_config -# echo 'DebianBanner no' >> /etc/ssh/sshd_config -# else cat > /etc/ssh/sshd_config.d/disable_password.conf << EOF PermitRootLogin prohibit-password PasswordAuthentication no @@ -197,7 +189,6 @@ EOF HostKeyAlgorithms +ssh-rsa PubkeyAcceptedKeyTypes +ssh-rsa EOF - fi printf "\E[0;33;40m" echo "### SSH password disabled ###"