Skip to content

Instantly share code, notes, and snippets.

@zdk
Last active November 5, 2024 11:02
Show Gist options
  • Save zdk/dbb14f93675e42a2b5c59cee42ec28da to your computer and use it in GitHub Desktop.
Save zdk/dbb14f93675e42a2b5c59cee42ec28da to your computer and use it in GitHub Desktop.
apt update
apt upgrade
echo "PubkeyAuthentication yes
PasswordAuthentication yes" >> /etc/ssh/sshd_config
systemcl restart ssh
sed -i '/^%sudo/c\%sudo ALL=(ALL) NOPASSWD:ALL' /etc/sudoers
usermod -aG sudo <user>
usermod -s /bin/bash <user>
apt install neofetch -y
apt install etckeeper -y
apt install auditd -y
echo "
/var/log/audit/audit.log {
daily
rotate 30
compress
delaycompress
missingok
notifempty
create 0640 root root
postrotate
/sbin/service auditd reload > /dev/null 2>&1 || true
endscript
}" > /etc/logrotate.d/audit
logrotate -f /etc/logrotate.d/audit
# update /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment