Getting started

First steps after your Linux VPS is ready (SSH, updates, firewall)

Log in over SSH, change the root password, install updates, add a sudo user and switch on a firewall without locking yourself out.

BeginnerLinux server2 min read

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.

Bash
ssh root@203.0.113.25

The 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:

Bash
passwd

3. Install updates

Fresh images are rarely fully up to date. Use the command for your distribution.

Debian and Ubuntu:

Bash
apt update && apt upgrade -y

AlmaLinux, Rocky Linux and other RHEL-based systems:

Bash
dnf upgrade -y

If a new kernel was installed, reboot so it takes effect:

Bash
reboot

4. 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:

Bash
adduser alex
usermod -aG sudo alex

RHEL-based systems:

Bash
adduser alex
passwd alex
usermod -aG wheel alex

Open 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:

Bash
apt install -y ufw
ufw allow OpenSSH
ufw enable
ufw status

On RHEL-based systems with firewalld:

Bash
systemctl enable --now firewalld
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload

Open 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:

Bash
timedatectl set-timezone Europe/London
timedatectl

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.