What you should do after getting your Virtual Private Server(VPS)?

When installed, the firewall will block any incoming connection by default. Therefore you need to allow incoming connections to SSH server before turning UFW on. Use the command:

sudo ufw allow 44933/tcp

To check, you have to make sure whether the port corresponds to the listener port of SSH server with the command:

sudo ufw show added

Turn on UFW:

sudo ufw enable

Check the current active rules:

sudo ufw status

Exit the SSH connection and then restore it. Now the VPS server is installed and protected.

Adding new user

It’s recommended to add new users during VPS installation to limit the access rights and exclude unauthorized access to the system.

First, connect to the VPS. It’s better to do it via SSH. Run the command of adding a new user:

$ sudo adduser <username>

Now check:

$ su — username

You’ve just created a new user with limited sudo rights. You can allocate admin rights to non-root users too. We’ll talk about it later. If there are many users, it’s recommended to check the rights settings from time to time. To do so, use the following command:

sudo dpkg-reconfigure tzdata

Rebuilding the kernel

After installing and basic setup of the VPS, you may need to update the kernel to its final version. Let’s see how it works for Linux.

First and the server as Root user with your general SSH client.

Update

You have to update the Ubuntu repository and all of its packages:

sudo apt-get update

sudo apt-get upgrade -y