First, you need a server. You can't learn about administering a remote Linux server without having one of your own - so today we're going to get one - completely free!
Through the magic of Linux and virtualization, it's now possible to get a small Internet server setup almost instantly - and at a very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a data center somewhere, a single physical server running Linux will be split into a dozen or more Virtual servers, using the KVM (Kernel-based Virtual Machine) feature that's been part of Linux since early 2007.
In addition to a hosting provider, we also need to choose which "flavor" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
Signing up with a VPS
Sign-up is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA or another second method of authentication. You will need to also provide your credit card information.
On a side note, avoid IBM Cloud as much as you can. They do not offer good deals and, according to some reports from previous students, their Linux VM is tampered with enough to the point some commands do not work as expected.
Select your instance and click "SSH", it will open a new window console. To access the root, type "sudo -i passwd" in the command line then set your own password. Log in by typing "su" and "password". Note that the password won't show as you type or paste it.
Remote access via SSH
You should see a "Public IPv4 address" (or similar) entry for your server in the account's control panel, this is its unique Internet IP address, and it is how you'll connect to it via SSH (the Secure Shell protocol) - something we'll be covering in the first lesson.
If you are using Windows 10 or 11, follow the instructions to connect using the native SSH client. In older versions of Windows, you may need to install a 3rd party SSH client, like PuTTY, and generate an sshkey pair.
If you are on Linux or MacOS, open a terminal and run the command:
ssh username@ip_address
Or, using the SSH private key, ssh -i private_key username@ip_address
Enter your password (or a passphrase, if your SSH key is protected with one)
Voila! You have just accessed your server remotely.
If in doubt, consult the complementary video that covers a lot of possible setups (local server with VirtualBox, AWS, Digital Ocean, Azure, Linode, Google Cloud, Vultr, and Oracle Cloud).
What about the root user?
Working on a different approach from smaller VPS, the big guys don't let use root to connect. Don't worry, root still exists in the system, but since the provider already created an admin user from the beginning, you don't have to deal with it.
You are now a sysadmin
Confirm that you can do administrative tasks by typing:
sudo apt update
(Normally you'd expect this would prompt you to confirm your password, but because you're using public key authentication the system hasn't prompted you to set up a password - and AWS has configured sudo* to not request one for "ubuntu").
Then:
sudo apt upgrade -y
Don't worry too much about the output and messages from these commands, but it should be clear whether they succeeded or not. (Reply to any prompts by taking the default option). These commands are how you force the installation of updates on an Ubuntu Linux system, and only an administrator can do them.
REBOOT
When a kernel update is identified in this first check for updates, this is one of the few occasions you will need to reboot your server, so go for it:
sudo reboot now
Your server is now all setup and ready for the course!
Note that:
This server is now running and completely exposed to the whole Internet
You alone are responsible for managing it
You have just installed the latest updates, so it should be secure for now
To logout, type logout or exit.
When you are done
You should be safe running the VM during the month for the challenge, but you can Stop the instance at any point. It will continue to count toward the bill, though.
When you no longer need the VM, Terminate/Destroy instance.
Now you are ready to start the challenge. Day 1, here we go!