Browse Source

Disable the Debian banner which can be used to identify the Debian version from the publc ip

Bob Mottram 9 years ago
parent
commit
628c1840a1
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/freedombone

+ 5
- 0
src/freedombone View File

@@ -3401,6 +3401,11 @@ function configure_ssh {
3401 3401
   sed -i 's/TCPKeepAlive.*/TCPKeepAlive no/g' /etc/ssh/sshd_config
3402 3402
   sed -i 's|HostKey /etc/ssh/ssh_host_dsa_key|#HostKey /etc/ssh/ssh_host_dsa_key|g' /etc/ssh/sshd_config
3403 3403
   sed -i 's|HostKey /etc/ssh/ssh_host_ecdsa_key|#HostKey /etc/ssh/ssh_host_ecdsa_key|g' /etc/ssh/sshd_config
3404
+  if ! grep -q 'DebianBanner' /etc/ssh/sshd_config; then
3405
+      echo 'DebianBanner no' >> /etc/ssh/sshd_config
3406
+  else
3407
+      sed -i 's|DebianBanner.*|DebianBanner no|g' /etc/ssh/sshd_config
3408
+  fi
3404 3409
   if grep -q 'ClientAliveInterval' /etc/ssh/sshd_config; then
3405 3410
       sed -i 's/ClientAliveInterval.*/ClientAliveInterval 60/g' /etc/ssh/sshd_config
3406 3411
   else