Setting Up Your First Linux VPS: From SSH to Firewall

The first steps to securing a new server: logging in via SSH, updating the system, creating a user, and enabling the firewall.

What a VPS is

A VPS (Virtual Private Server) is a computer on the internet that you manage yourself. Unlike shared hosting, here you hold full control: installing applications, configuring the web server, and storing data on your own machine.

Because you have full control, the responsibility for security is also in your hands. The initial steps below help you get started in an orderly way.

Logging in via SSH

SSH is how you log into the server remotely. After your VPS provider gives you an IP address and a key, open the terminal and use the command:

terminal / code
ssh root@ALAMAT_IP_SERVER

Updating the system

The first good thing to do is update the package list and install security updates:

terminal / code
apt update && apt upgrade -y

Creating a new user

Working as root all the time is risky. Create a regular user, then grant administrative rights when needed:

terminal / code
adduser edologia
usermod -aG sudo edologia

Enabling the firewall

A firewall limits which ports are open. Allow SSH first so you don't lock yourself out of the server, then enable it:

terminal / code
ufw allow OpenSSH
ufw enable
ufw status

Security notes

Disable password login for root and use an SSH key. Never share your private key. Keep a copy of important configuration, and test the new user's login in a separate terminal session before closing the root session, so you don't lose access.

Edologia Team Writer & Practitioner — writes from real practice, not just theory.
Something not clear?

Ask via WhatsApp and we'll explain it in plain language.

Keep reading

Related Articles

Keep learning

Practice While You Learn

Need a server and full guidance to try the steps above? Ask about the package details and options first — no pressure.

Chat on WhatsApp