Secure a newly deployed VPS on DigitalOcean, AWS, or Hetzner against automated bot attacks.
Set up SSH key authentication and two-factor login to prevent unauthorized remote access.
Install intrusion detection tools that automatically block suspicious IP addresses probing your server.
Detect and remove rootkits and malware hiding on your Linux server.
This is a comprehensive, free how-to guide for securing a Linux server, written for people who have set up or are setting up a server that's accessible on the internet and want to protect it from attackers. It's not software you run; it's a detailed written guide with step-by-step commands and explanations. The guide covers the full spectrum of server hardening (the practice of reducing attack surface by locking down default settings): securing SSH access (the protocol used to remotely connect to and manage servers) with key-based authentication and two-factor login, setting up firewalls to block unwanted traffic, installing intrusion detection tools that automatically ban IP addresses that probe for vulnerabilities, enforcing strong password policies, monitoring for suspicious file changes, running antivirus scans, and detecting rootkits (malicious software designed to hide itself from the server owner). This is aimed at developers, sysadmins, and founders who are self-hosting their own Linux servers, on a VPS (virtual private server) from providers like DigitalOcean, Hetzner, or AWS, and want to go beyond the basics. The moment a server is reachable on the internet, it starts receiving automated probing from bots looking for vulnerabilities. This guide teaches you to close those doors. The guide is especially valuable for those new to server administration who want to understand why each security measure matters, not just what commands to run. Automated Ansible playbooks (scripts that apply the guide's steps automatically) are also available separately. The guide is freely licensed and actively community-maintained with nearly 26,000 GitHub stars.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.