Skip to content

Commit

Permalink
add sshd config
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Oehrli committed May 3, 2022
1 parent 8388321 commit 8260fd1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/guacamole_init.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,24 @@ else
echo "INFO: Skip setup of guacamole stack"
fi

echo "INFO: Add Accenture SSH configuration"
# accenture ssh config
cat << EOF >/etc/ssh/Banner
This system is the property of Accenture, and is to be used in accordance with
applicable Accenture Policies.Unauthorized access or activity is a violation of
Accenture Policies and may be a violation of law. Use of this system constitutes
consent to monitoring or unauthorized use, in accordance with Accenture Policies,
local laws, and regulations. Unauthorized use may result in penalties including,
but not limited to, reprimand, dismissal, financial penalties, and legal action
EOF
sed -i 's/.*MaxAuthTries.*/MaxAuthTries 5/g' /etc/ssh/sshd_config
sed -i 's/.*HostBasedAuthentication.*/HostBasedAuthentication no/gi' /etc/ssh/sshd_config
sed -i 's/.*PermitRootLogin.*/PermitRootLogin no/g' /etc/ssh/sshd_config
sed -i 's|.*Banner.*|Banner /etc/ssh/Banner|g' /etc/ssh/sshd_config
systemctl reload sshd

# add a login banner
echo "INFO: Configure login banner"
cp -v /etc/motd /etc/motd.orig
Expand Down

0 comments on commit 8260fd1

Please sign in to comment.