diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-09-10 06:53:25 -0700 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-10-11 18:33:24 -0700 |
| commit | 6441758bb0247a22efc33c3db65b83387a84462a (patch) | |
| tree | c75e3a32b0f6dbfcae22c4c26bd06e565c0de36b /scripts | |
| download | site-server-images-6441758bb0247a22efc33c3db65b83387a84462a.zip | |
Initial Commit
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/harden-root.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/harden-root.sh b/scripts/harden-root.sh new file mode 100644 index 0000000..c8e267a --- /dev/null +++ b/scripts/harden-root.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +main() { + chown root:wheel /etc/doas.conf + chmod 0640 /etc/doas.conf + usermod -p '*' root + sed -i 's/^PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config + rcctl reload sshd +} + +main "$@" |