Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions salt/benchmarks/configs/sshd-hardening.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Forbid any root SSH login
PermitRootLogin no

# Only allow public key auth for all users
PasswordAuthentication no
KbdInteractiveAuthentication no
ChallengeResponseAuthentication no
PubkeyAuthentication yes

# Restrict who can SSH in - allow PSF users and system admins
AllowGroups psf-users sudo admin

# Where to read user keys from
AuthorizedKeysFile .ssh/authorized_keys

# Keep PAM enabled for account/session modules (e.g., limits)
UsePAM yes
13 changes: 13 additions & 0 deletions salt/benchmarks/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/etc/ssh/sshd_config.d/99-hardening.conf:
file.managed:
- source: salt://benchmarks/configs/sshd-hardening.conf
- user: root
- group: root
- mode: "0644"

ssh-reload-benchmarks:
service.running:
- name: ssh
- reload: True
- watch:
- file: /etc/ssh/sshd_config.d/99-hardening.conf
4 changes: 4 additions & 0 deletions salt/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ base:
- pgbouncer
- buildbot

'benchmarks':
- match: nodegroup
- benchmarks

'cdn-logs':
- match: nodegroup
- cdn-logs
Expand Down