A new Linux VPS gives you full root access and a clean operating system. Spend ten minutes on these first steps and your server will be up to date, easier to manage and much harder to break into.
1. Log in over SSH
Find your server's IP address and root password in the client area under Services. Then open a terminal. On Windows 10 and 11 you can use PowerShell or Windows Terminal, because the OpenSSH client is built in.
ssh root@203.0.113.25The first time, SSH asks you to confirm the server's fingerprint. Type yes and press Enter, then paste the password. Nothing appears on screen while you type the password. That is normal.
Tip: If SSH will not connect at all, open Open Control Panel from your service page and use the browser console. It works even when networking or SSH is misconfigured.
2. Change the root password
Set a long, unique password that only you know:
passwd3. Install updates
Fresh images are rarely fully up to date. Use the command for your distribution.
Debian and Ubuntu:
apt update && apt upgrade -yAlmaLinux, Rocky Linux and other RHEL-based systems:
dnf upgrade -yIf a new kernel was installed, reboot so it takes effect:
reboot4. Create a normal user with sudo
Working as root all the time makes mistakes more costly. Create your own user and give it admin rights.
Debian and Ubuntu:
adduser alex
usermod -aG sudo alexRHEL-based systems:
adduser alex
passwd alex
usermod -aG wheel alexOpen a second terminal and check that ssh alex@203.0.113.25 works and that sudo whoami prints root.
5. Turn on a firewall
Allow SSH before you enable the firewall, or you will lock yourself out.
Warning: Always allow SSH first. If you do lock yourself out, the browser console in the control panel still works, so you can fix the rules from there.
On Ubuntu and Debian with UFW:
apt install -y ufw
ufw allow OpenSSH
ufw enable
ufw statusOn RHEL-based systems with firewalld:
systemctl enable --now firewalld
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reloadOpen more ports only when you need them, for example ufw allow 80,443/tcp for a website.
6. Set the time zone
Correct times make logs much easier to read:
timedatectl set-timezone Europe/London
timedatectlNext steps
- Replace password logins with keys: Set up SSH keys.
- Learn how traffic is counted: Understanding bandwidth.
