Ubuntu 18 lts : Barebone first login

This is a small reminder that once you get a VPS with a provider (like RAMNode, etc) that you should not forget to do a few things.

There’s of course the software (daemons, services, servers, tools, commands, etc) that you wish to install to get to your end goal (run a game server, or a website).

But privacy, security, and keeping current, is important.

If you can, go with the latest lts of Ubuntu, for us currently that’s 18 (even though 20 is out)

And even before you login as root user, read the welcome email from your provider. Remember.. your root pass is in that email usually. So step 1 is not to install an Apache web server, or java for Minecraft server. It’s to get into the control panel of your host and change the root password.

We will use other blog posts soon where we talk about preventing root from even logging in, to add a basic firewall, add a sudo user, etc. Before we get to that, follow the instructions from your host to get to their control panel, and find out how to change the root password.

Go to 1Password or whatever password manager you have, and note down the host/ip, and ssh port, the url to the control panel, the root user and pass, and the now changed user/pass. This way you don’t have to depend on that welcome email. You could even remove it (archive it in 1password if you so desire). So if your email ever get compromised, they. can’t get into the VPS at least.

Ok, now it’s time to make that first connection.

ssh root@example.com -p 22

It will ask you some information. And hopefully you get into the system.

Step 1 is done, you confirmed root login works, and that it works with the new password. And that you’ve taken note of this in 1Password.

Step 2 is next, and that’s to keep the system current. This is as simple as typing the following commands into Ubuntu as root user:

apt-get update

when that’s done:

apt-get upgrade

When this asks for Y/n questions, accept Y for yes, to update things.

And now when this is done, you’re ready for the next step, which is to add additional users to the system. One for maybe web stuff, or a game server, another one for everyday server management (a sudo user). I will try to make another blog entry on how to do that. And after that we have to change the ssh port, and remove the option for root to login through ssh. Then add a firewall, etc.

I hope this helps. These first steps on getting started with the barebone Ubuntu box has worked on old 14 32bit to 20 64bit versions of Ubuntu.