From 9747eba72b664186cebf4ce8e432eb2d091a8a53 Mon Sep 17 00:00:00 2001 From: akanealw Date: Fri, 22 Dec 2023 18:00:31 -0600 Subject: [PATCH] testing --- debian/debian-configure-sshd.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/debian-configure-sshd.sh b/debian/debian-configure-sshd.sh index 5a9f503..52b9108 100644 --- a/debian/debian-configure-sshd.sh +++ b/debian/debian-configure-sshd.sh @@ -14,7 +14,7 @@ if [ $isInFile -eq 0 ] isInFile=$(cat /etc/ssh/sshd_config | grep -c "#PermitRootLogin prohibit-password") if [ $isInFile -eq 0 ] then - cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak1 + cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak1 > /dev/null 2>&1 sed -i 's/PermitRootLogin no/#PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config sed -i 's/PermitRootLogin yes/#PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config sed -i 's/PermitRootLogin prohibit-password/#PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config @@ -27,7 +27,7 @@ if [ $isInFile -eq 0 ] isInFile=$(cat /etc/ssh/sshd_config | grep -c "PasswordAuthentication no") if [ $isInFile -eq 0 ] then - cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak2 + cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak2 > /dev/null 2>&1 sed -i 's/#PasswordAuthentication no/PasswordAuthentication no/g' /etc/ssh/sshd_config sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config @@ -75,7 +75,7 @@ fi isInFile=$(cat /home/akanealw/.ssh/config | grep -c "*root") if [ $isInFile -eq 0 ] then - cp /home/akanealw/.ssh/config /home/akanealw/.ssh/config.bak + cp /home/akanealw/.ssh/config /home/akanealw/.ssh/config.bak > /dev/null 2>&1 mv /home/akanealw/.ssh/known_hosts /home/akanealw/.ssh/known_hosts.old echo "" >> /home/akanealw/.ssh/config echo "" >> /home/akanealw/.ssh/config @@ -97,7 +97,7 @@ fi isInFile=$(cat /root/.ssh/config | grep -c "*root") if [ $isInFile -eq 0 ] then - cp /root/.ssh/config /root/.ssh/config.bak + cp /root/.ssh/config /root/.ssh/config.bak > /dev/null 2>&1 mv /root/.ssh/known_hosts /root/.ssh/known_hosts.old echo "" >> /root/.ssh/config echo "" >> /root/.ssh/config