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 ###"