Skip to content
Snippets Groups Projects
Commit bbae1779 authored by Bob Mottram's avatar Bob Mottram
Browse files

More ssh server settings

parent 5f8faa36
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
# License
# =======
#
# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
......@@ -40,6 +40,22 @@ function configure_ssh {
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
return
fi
if ! grep -q 'RhostsRSAAuthentication' /etc/ssh/sshd_config; then
echo 'RhostsRSAAuthentication yes' >> /etc/ssh/sshd_config
else
sed -i 's|#RhostsRSAAuthentication.*|RhostsRSAAuthentication yes|g' /etc/ssh/sshd_config
fi
sed -i 's|#StrictModes.*|StrictModes yes|g' /etc/ssh/sshd_config
sed -i 's|StrictModes.*|StrictModes yes|g' /etc/ssh/sshd_config
sed -i 's|#KerberosAuthentication.*|KerberosAuthentication no|g' /etc/ssh/sshd_config
sed -i 's|KerberosAuthentication.*|KerberosAuthentication no|g' /etc/ssh/sshd_config
sed -i 's|#GSSAPIAuthentication.*|GSSAPIAuthentication no|g' /etc/ssh/sshd_config
sed -i 's|GSSAPIAuthentication.*|GSSAPIAuthentication no|g' /etc/ssh/sshd_config
sed -i 's|#IgnoreUserKnownHosts.*|IgnoreUserKnownHosts yes|g' /etc/ssh/sshd_config
sed -i 's|IgnoreUserKnownHosts.*|IgnoreUserKnownHosts yes|g' /etc/ssh/sshd_config
sed -i 's|#Compression.*|Compression delayed|g' /etc/ssh/sshd_config
sed -i 's|Compression.*|Compression delayed|g' /etc/ssh/sshd_config
if ! grep -q 'HostbasedAuthentication' /etc/ssh/sshd_config; then
echo 'HostbasedAuthentication no' >> /etc/ssh/sshd_config
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment