Top Security Steps You Should Take After Buying a VPS

Virtual Private Server (VPS) gives you power, flexibility, and control over your hosting environment. But with that control comes responsibility β€” especially when it comes to security. Right after you deploy a VPS, there are essential steps you should take to protect it from hackers, malware, and unauthorized access.

At Hosteons, we want our customers to stay secure from day one. Here’s a checklist of the top security steps you should take after purchasing a VPS.


πŸ”‘ 1. Change the Default SSH Port

Most VPS servers use port 22 for SSH access by default, which makes it an easy target for brute-force attacks. Change it to a non-standard port for better protection.


πŸ”’ 2. Set Up SSH Keys Instead of Passwords

Using passwords alone is risky. Instead, configure SSH key authentication. This ensures only devices with the correct private key can access your VPS.


πŸ›‘ 3. Configure a Firewall

Install and configure a firewall like UFW (Uncomplicated Firewall) or CSF (ConfigServer Security & Firewall) to block unauthorized traffic and allow only the services you need.


🚨 4. Install Fail2Ban

Fail2Ban helps prevent brute-force attacks by banning IPs that show malicious behavior, such as repeated failed login attempts.


πŸ“¦ 5. Keep Your System Updated

Always run system updates regularly:

apt update && apt upgrade -y   # Ubuntu/Debian  
yum update -y                  # CentOS/AlmaLinux  

This ensures you have the latest security patches.


πŸ‘€ 6. Create a Non-Root User

Running everything as root is risky. Create a regular user account with sudo privileges to reduce exposure if compromised.


πŸ” 7. Secure Critical Services

  • Disable unused services to reduce entry points.
  • Restrict database access to localhost unless remote access is absolutely necessary.
  • Use strong, unique passwords for all accounts.

πŸ“‚ 8. Enable Automatic Backups

Even with strong security, accidents can happen. Enable automated VPS backups through the Virtualizor panel or cron jobs to ensure you can recover quickly.


πŸš€ Bonus: Use Monitoring Tools

Set up monitoring tools like Logwatch or integrate with external monitoring services to get alerts about suspicious activity.


βœ… Conclusion

Securing your VPS right after purchase is the most important step you can take to protect your data, applications, and users. By following this checklist, you’ll reduce risks and keep your server safe from the start.

At Hosteons, we provide VPS with 10Gbps ports, multiple global locations, and full root access, giving you the flexibility to apply all these security best practices easily.

πŸ‘‰ Explore our VPS plans today:

How to Secure a VPS Right After Deployment – Checklist for 2025

Deploying a VPS is the first step to building your online presence, hosting applications, or running business-critical services. But if you don’t secure it immediately after deployment, your server could become an easy target for hackers and automated bots.

Here’s a step-by-step security checklist for 2025 to harden your VPS from the start.


βœ… 

1. Update Your System

Outdated packages and kernels are the biggest vulnerabilities.

Run these commands right after login:

sudo apt update && sudo apt upgrade -y   # For Ubuntu/Debian
sudo dnf update -y                      # For CentOS/AlmaLinux

βœ… 

2. Create a New User and Disable Root Login

Never use the root account for day-to-day operations.

adduser youruser
usermod -aG sudo youruser

Edit the SSH configuration:

sudo nano /etc/ssh/sshd_config

Change:

PermitRootLogin no

Restart SSH:

systemctl restart ssh

βœ… 

3. Set Up SSH Key Authentication

Passwords can be brute-forced. Use SSH keys instead.

Generate keys on your local machine:

ssh-keygen -t rsa -b 4096

Copy your public key to the VPS:

ssh-copy-id youruser@server_ip

Disable password login in /etc/ssh/sshd_config:

PasswordAuthentication no

Restart SSH again.


βœ… 

4. Change the Default SSH Port

Bots scan port 22 for vulnerabilities. Change it to a non-standard port (e.g., 2222):

sudo nano /etc/ssh/sshd_config

Set:

Port 2222

Restart SSH:

systemctl restart ssh

βœ… 

5. Enable a Firewall

Use UFW for Ubuntu/Debian:

sudo ufw allow 2222/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

For CentOS/AlmaLinux (Firewalld):

sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload

βœ… 

6. Install Fail2Ban

Protect against brute-force attacks:

sudo apt install fail2ban -y    # Debian/Ubuntu
sudo dnf install fail2ban -y    # CentOS/AlmaLinux

Enable and start Fail2Ban:

sudo systemctl enable fail2ban
sudo systemctl start fail2ban

βœ… 

7. Disable Unnecessary Services

Check running services:

systemctl list-unit-files --type=service --state=enabled

Disable what you don’t need:

sudo systemctl disable service_name

βœ… 

8. Enable Automatic Security Updates

On Ubuntu/Debian:

sudo apt install unattended-upgrades -y

On CentOS/AlmaLinux:

sudo dnf install dnf-automatic -y
sudo systemctl enable --now dnf-automatic.timer

βœ… 

9. Install a Malware Scanner

Use ClamAV for basic malware scanning:

sudo apt install clamav -y

βœ… 

10. Backup Regularly

Security is not complete without backups. Use tools like:

  • rsync
  • rclone
  • Cloud backups from your Hosteons VPS panel

Pro Tip:

Hosteons offers an Initial VPS Setup Script that secures your server instantly with best practices:

πŸ‘‰ GitHub Script

πŸ‘‰ Full Guide


Final Thoughts

Securing your VPS should never be an afterthought. With these 10 steps, you can minimize vulnerabilities and keep your server safe from evolving cyber threats in 2025.

πŸ›‘οΈ Ready to get started?

Order a reliable VPS now: Hosteons VPS Plans