Linux Security Basics
5 min read
Secure a server: disable root SSH login, use key-based auth, enable UFW, install fail2ban, keep packages updated, and run only required services. Use lynis audit system for a comprehensive security audit.
Security Essentials
- Disable root SSH login:
PermitRootLogin no in /etc/ssh/sshd_config - Use SSH key authentication, disable passwords
- Keep system updated:
apt upgrade - Use
fail2ban to block brute-force - Configure UFW firewall
- Check failed logins:
grep "Failed" /var/log/auth.log