From bf8e095b36ba8a9b241ad5f124978e8201ad73b2 Mon Sep 17 00:00:00 2001 From: ChiefGyk <alon@ganon.me> Date: Wed, 20 Jul 2016 16:46:38 -0400 Subject: [PATCH] added grep to see if ciphers were already added for when rerunning the script --- setup/system.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/system.sh b/setup/system.sh index 3f5efcf3..0e0960fc 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -220,9 +220,9 @@ APT::Periodic::Verbose "1"; EOF # Harden SSH and disable weak ciphers -echo "Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128" >> /etc/ssh/sshd_config -echo "MACs hmac-sha1,umac-64@openssh.com,hmac-ripemd160" >> /etc/ssh/sshd_config - +grep -q -F "Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128 \ +MACs hmac-sha1,umac-64@openssh.com,hmac-ripemd160" /etc/ssh/sshd_config || echo "Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128 \ +MACs hmac-sha1,umac-64@openssh.com,hmac-ripemd160" >> /etc/ssh/ssh_config # ### Firewall