Hosting Provider

Overview

At the end of this section, you should have a newly initialized server that meets the requirements and is accessible via ssh for the root user or compatible sudo user.

Order New Server

The first step is to order a new server from your hosting provider that meets the requirements listed in the beginning of this section.
Here is a list of some hosting providers to consider:

Install OS

Once the server has been purchased, the next step will be to install the recommended OS. Each hosting provider's UI is slightly different. Sometimes this is part of the server purchase and other times this must be done after the server is added to your account.

Verify SSH Access

Once the OS is installed, verify that you have ssh access to the root user, or similiar sudo user.
Copied!
If you are able to successfully ssh into the root user then you are done and can continue to the Server Initialization.
If you either don't have a root user or are prompted for a password when ssh'ing into the server, please see the follow sections for help.

Adding SSH Key

Most hosting providers have a way to add ssh keys to your account so that they are added automatically when the OS is installed on new servers. Check your hosting provider's support documentation to see if this is an option.
If your hosting provider doesn't have an option for adding an ssh key during the OS install, you can add your ssh key manually.
NOTE you need the password for the user (i.e. root) in order to do this. If you don't have the password, and cannot ssh into the server with the password you will most likely need to re-install the OS to generate a new password with your hosting provider.
To add your key manually, you can execute the following command:
1
ssh-copy-id -i ~/.ssh/mykey [email protected]<host>
Copied!
See https://www.ssh.com/academy/ssh/copy-id for more information on copying over your ssh key

Verifying Sudo User Permissions

Some new OS distributions will not create a root user for security purposes. In this case you might have a debian user for example. To verify that the user has the right sudo permissions you can use the following command after you have ssh'd into the server:
1
sudo -l -U <username>
Copied!
This will print out the following:
1
Matching Defaults entries for <username> on <host>:
2
...
3
4
User <username> may run the following commands on <host>:
5
(ALL : ALL) ALL
6
(ALL) NOPASSWD: ALL
7
(ALL) NOPASSWD: ALL
8
(root) NOPASSWD: ALL
Copied!
The key things here are (ALL : ALL) ALL and NOPASSWD which confirm that this user has root access and doesn't require a password with sudo.
More info here.
Last modified 2mo ago