From d235c8dbe4c2adaf01a9566a535903c5c23ed3af Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jun 2017 13:35:34 +0100 Subject: [PATCH] quiet --- src/freedombone-utils-ssh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/freedombone-utils-ssh b/src/freedombone-utils-ssh index f42d9911..65533d26 100755 --- a/src/freedombone-utils-ssh +++ b/src/freedombone-utils-ssh @@ -40,12 +40,11 @@ function configure_ssh { if [[ $(is_completed $FUNCNAME) == "1" ]]; then return fi - if ! grep 'HostbasedAuthentication' /etc/ssh/sshd_config; then + if ! grep -q 'HostbasedAuthentication' /etc/ssh/sshd_config; then echo 'HostbasedAuthentication no' >> /etc/ssh/sshd_config - else - sed 's|#HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config - sed 's|HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config fi + sed 's|#HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config + sed 's|HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config sed -i 's|#PrintLastLog.*|PrintLastLog yes|g' /etc/ssh/sshd_config sed -i 's|PrintLastLog.*|PrintLastLog yes|g' /etc/ssh/sshd_config sed -i 's|#IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config