Last active
November 5, 2024 11:02
-
-
Save zdk/dbb14f93675e42a2b5c59cee42ec28da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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