Cualquier público VPS tiene fuerza bruta en minutos de ir en línea. Esta es la base de referencia que lo detiene. Funciona en cualquier servidor Ubuntu/Debian, incluido el nuestro.
# on YOUR computer:
ssh-keygen -t ed25519 -C "vps"
ssh-copy-id root@YOUR_SERVER_IP
ssh root@YOUR_SERVER_IP # must log in WITHOUT password — verify!
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
systemctl reload ssh
# keep this session open; test a NEW connection before closing it
apt install -y ufw fail2ban
ufw default deny incoming && ufw default allow outgoing
ufw allow OpenSSH && ufw enable
cat > /etc/fail2ban/jail.local <<'EOF'
[sshd]
enabled = true
maxretry = 5
bantime = 1h
EOF
systemctl enable --now fail2ban
apt install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades # choose Yes
Esa es la 80/20 de seguridad del servidor: llaves, cortafuegos, prohibiciones, parches. ¿Quieres saltar el paso 1–2? Nuestros servidores embarcan endurecidos por defecto — ver planes.