Merge pull request #144 from trails-cool/chore/harden-sshd
Harden SSH config
This commit is contained in:
commit
0150c40631
1 changed files with 12 additions and 0 deletions
|
|
@ -41,6 +41,18 @@ resource "hcloud_server" "trails" {
|
|||
|
||||
# Create app directory
|
||||
mkdir -p /opt/trails-cool
|
||||
|
||||
# Harden SSH
|
||||
cat > /etc/ssh/sshd_config.d/99-hardening.conf <<'SSHD'
|
||||
PasswordAuthentication no
|
||||
X11Forwarding no
|
||||
AllowTcpForwarding no
|
||||
AllowAgentForwarding no
|
||||
MaxAuthTries 3
|
||||
ClientAliveInterval 300
|
||||
ClientAliveCountMax 2
|
||||
SSHD
|
||||
systemctl reload ssh
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue