Staging #2

Merged
admin merged 5 commits from Staging into main 2025-10-28 01:07:19 +00:00
Showing only changes of commit 06e1350747 - Show all commits

View File

@@ -48,4 +48,13 @@ echo "Configuring firewall..."
ufw allow OpenSSH
ufw --force enable
# === HARDEN SSH: Disable root login via SSH ===
echo "Disabling root SSH login..."
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
systemctl restart ssh || service ssh restart
# === ENSURE beer CAN USE SUDO ===
usermod -aG sudo beer
echo "Setup complete! You can now SSH into the container/VM as '$USERNAME'."