From 628c1840a1de8025c78673d0f966cadd4a032460 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 29 Dec 2015 12:29:10 +0000 Subject: [PATCH] Disable the Debian banner which can be used to identify the Debian version from the publc ip --- src/freedombone | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/freedombone b/src/freedombone index c5b6d612..229a7016 100755 --- a/src/freedombone +++ b/src/freedombone @@ -3401,6 +3401,11 @@ function configure_ssh { sed -i 's/TCPKeepAlive.*/TCPKeepAlive no/g' /etc/ssh/sshd_config sed -i 's|HostKey /etc/ssh/ssh_host_dsa_key|#HostKey /etc/ssh/ssh_host_dsa_key|g' /etc/ssh/sshd_config sed -i 's|HostKey /etc/ssh/ssh_host_ecdsa_key|#HostKey /etc/ssh/ssh_host_ecdsa_key|g' /etc/ssh/sshd_config + if ! grep -q 'DebianBanner' /etc/ssh/sshd_config; then + echo 'DebianBanner no' >> /etc/ssh/sshd_config + else + sed -i 's|DebianBanner.*|DebianBanner no|g' /etc/ssh/sshd_config + fi if grep -q 'ClientAliveInterval' /etc/ssh/sshd_config; then sed -i 's/ClientAliveInterval.*/ClientAliveInterval 60/g' /etc/ssh/sshd_config else