scripts/configure-system
2025-07-16 15:11:55 +02:00

14 lines
306 B
Bash
Executable file

#!/bin/sh
sed -i 's/#?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
systemctl restart sshd
apt update
apt install -y fail2ban vim
apt purge -y vim-tiny cryptsetup-initramfs
cat > /etc/fail2ban/jail.d/sshd.conf << EOT
[sshd]
mode = aggressive
EOT
systemctl restart fail2ban