Dev.to
6/20/2026

Securing a Server in the First 45 Minutes: VPS Hardening Checklist
Short summary
Rapidly secure a new VPS within 45 minutes to prevent bot attacks that begin within minutes of deployment. Disable SSH password authentication, set up SSH key pairs, and configure a firewall (ufw or firewalld) to deny all incoming traffic by default while opening only essential ports (SSH, HTTP, HTTPS). The guide provides step-by-step commands, explains security reasoning, and includes real incidents demonstrating the cost of skipping these foundational steps.
- •Set up SSH key pairs and disable password authentication to block brute-force attacks
- •Configure firewall (ufw or firewalld) to deny all incoming traffic by default, open only SSH/HTTP/HTTPS
- •Rapid action prevents bot scanning that begins within minutes of server deployment
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



