Released in April 2020, Ubuntu serves as one of the best and vastly prominent open-source operating systems. Several companies speculate that it is the best release to be released to date. Ubuntu 20.04 LTS is a safe, steady, budget-friendly, and enterprise-class operating system that has been disseminated in the interest of both organizations and domestic users. Ubuntu brought along several changes that helped a huge crowd of people.
Sidelining the benefits for a minute, let us appreciate how Ubuntu left no stone unturned to impress its users. The new version comes with a sharp look that blows your mind! It has come up with a revived Yaru theme.
There are several other beneficiaries that Ubuntu 20.04 LTS has to provide. It emerged with certain UI improvements, GNOME 3.36 features, retains bigger apps, and several other benefits.
With that being said, let us now explore the procedure that leads to the availability of these windfalls. Read on and investigate the most important procedure of setting up the initial server with Ubuntu 20.04.
There are distinct arrangements that need to be made before you build a fresh Ubuntu 20.04 server. Follow these steps and experience a stable, secure server with utter ease.
● Step 1: The Basic Login
Before commencing the procedure, the fundamental step is to login into your server. For that, you'll require the server's public IP address and a password. In case you have registered using the SSH key, you'll need the root user account's private key.
Moreover, if you're already logged in, all you need to do is log in to the root user using a command that's shown below:
$ ssh root@your-server_ip
(Note: the highlighted part should be replaced with the server's public IP address)
Now, you approve the warning that flashes before you regarding the host authenticity. Give your password to log in. Remember, it is completely fine if you are urged to change your root password since it is a protocol to be followed when logging in for the first time. Conversely, if the user logs in with an SSH key, he/she might be induced to put in the passphrase for the initial time.
This takes us to the next step, which is to develop a new user account. This account is functional for daily use, yet it comes with fewer privileges.
● Step 2: Building New User
Once done with the first step, you need to establish a fresh account for future use. Now whenever you log in in the future, this account will be used instead of the root account. The following is the code that needs to be put in with the distinctive name of your account:
This will lead you to certain questions and a password requisite. This is when you create a robust enough password. Fill in the required information if you wish to. It is not mandatory though, so you can skip it any moment and press the Enter key.
● Step 3: Accord Administrative Benefits
Remember, we told you that the new account comes with fewer privileges, it's time now to expedite those and enjoy the benefits extensively. This step comes in handy when the user wishes to accomplish administrative activities.
This has two ways: one is to log out and get back to the basic root account. The other more convenient way encompasses setting up the superuser or root account for this particular normal account. The procedure is simple—you just need to put the command—Sudo before every command you give. The procedure comes in handy and provides you with the privileges of a superuser account without much hassle. The privileges, however, will be added to the new user by adding the user to the sudo group. This command is accessible to the users who are already a member of the sudo group.
Following is the command that needs to be given:
# usermod -aG sudo John.
Use the same procedure to Paul the added privileges.
● Step 4: Setup Of A Firewall
Coming to Step 4, here the Firewall is set up. The Ubuntu 20.04 workers can utilize the UFW Firewall to ensure just associations with specific administrations are permitted. We can set up an essential firewall effectively utilizing this application. Applications must use UFW upon its installation to register their profiles. These profiles permit UFW to manage these applications by name. OpenSSH, the service that enables us to associate with our server has a profile registered with UFW now.
Here's an illustration:
#ufw app list
Always remember that you need a firewall connection for future purposes too. To make sure you do not miss out on this, ensure that the SSH connection is allowed so that the next time you log back in, there are no complications. This can be done by following:
#ufw allow OpenSSH
Enable the firewall by the following step:
Here, you type- y and hit ENTER to proceed further. SSH connections are allowed by typing:
This leads to the following output:
To Action From
-- --------- ------
OpenSSH ALLOW Anywhere
OpenSSH ALLOW Anywhere (v6)
Now the situation is such that the firewall will block all connections other than SSH. In case you wish to use additional services, a primary requisite for this is to simply adjust the setting of the firewall accordingly. This will enable the traffic to get in.
Now with all being done, you want to make sure that SSH is allowed directly into the account. The process for this step solely depends on the authentication type: SSH keys or password.
Let us briefly look at how we can make things work in both situations.
In this case, the user can utilize a new terminal session to get access to SSH to the new user account. Moreover, use SSH with the username that you recently created.
$ ssh john@your-server-ip
Once logged in, remember the previous step to avail of the additional privileges.
SSH Key Authentication:
Add a copy of the particular public key to the new account file to see a successful login. The simplest way forward is:
#rsync --ar hive --chown=john: john~john~/.ssh /home/john
With this being done, a terminal session is to be opened on the local machine. Further, the SSH is used with the username.
# ssh john@your_server_ip
This brings us to the end of server setup on Ubuntu 20.04 LTS. Make sure that you follow each step with attention.
Know more about E2E Cloud - https://bit.ly/3eaePdo
Contact no - 9599620390
Email - firstname.lastname@example.org