Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: VPS Setup

Secure SSH on a Debian VPS by editing /etc/ssh/sshd_config—use
nano /etc/ssh/sshd_config
and set Port 2222 to avoid common scans PermitRootLogin no to disable root access and PasswordAuthentication no for key-only logins Generate keys locally with
ssh-keygen -t rsa -b 4096
then copy them via
ssh-copy-id user@ip -p 2222
Restart SSH with
systemctl restart sshd
and test with
ssh -p 2222 user@ip
—expect key-based login success This hardens your VPS against brute-force attacks ensuring safe CLI and FTP access

Back to All Tips