The only requisite for the enabling function is to ensure that your system has SSH installed in it. If not, you can first install it through the sudo command and then enable it.
Process for Enabling SSH
You can successfully enable and run the SSH protocol on your server by undergoing these four primary steps. These steps can assist you in effectively utilizing the network protocol of SSH on ubuntu 20.04.
Step 1 is the installation of SSH
Step 2 is enabling SHH
Step 3 is checking the status
Step 4 is connecting with firewall port
Installation of SSH
For installing, just run two additional commands for updating and up-gradation and then run the third sudo command to install the SSH on your server finally. The commands are as follows;
$ sudo apt install openssh-server
You can also use install shh instead of openssh in the command as both will allow you to download the open package of SHH protocol. Type your password and continue the installation.
Now simply enable the network protocol in your operating system with the help of the following command;
$ sudo systemctl enable –now ssh
That’s all, and you have enabled the protocol for encrypted network on your system successfully.
Now simply check the status of your protocol. Checking status also involves the command for stopping, reloading, and restarting the protocol. Use the following controls if you want to check the status.
$ systemctl status ssh.service
You can modify the status checking if you replace the status with other commands encompassing the reload, restart, and stop commands.
Connect with Firewall Port
It’s recommended connecting the server with port 22 if your firewall is active, also ensure that you are logged in the server of the protocol with the root user.
The steps, as mentioned above, can assure the security of your connected network. Also, you can get leverage from the attributes of the protocol. Just remember that for connecting to the server via SSH, you’ll need to use your user name and your system’s IP.