SSH-SERVER CONFIGURATION


If you wish to navigate back to the table then

The SSH-Server Component consists of a Daemon [Which is a programme running in the background] called "sshd" which accepts connection-requests made by the SSH-Clients & it functions more like a SystemD-based Init-system.
So you can use the functionalities of the Init-System of your choice [Like SystemD, RunIt, OpenRC, SysVinit etc...] to influence the behaviour/state of your SSH-Server, here are some examples:- Now in order to configure your "SSH-Server Component"; You need to edit a configuration-file located in the "ssh"-folder, which is usually in the "etc"-folder in your remote-server's ROOT-FOLDER/DIRECTORY & the file is called "sshd_config". To enable certain settings in the configuration-file, you will have to UN-COMMENT the lines of text & typing out the values in certain other places.

#Port 22 --> Port 2222
Here we UN-COMMENTED & changed the PORT-NUMBER
	
PermitRootLogin yes --> PermitRootLogin no 
Here we changed the VALUE from "yes" to "no"

#PasswordAuthentication yes --> PasswordAuthentication no 
Here we UN-COMMENTED & changed the VALUE from "yes" to "no"

Here it is shown that we can change PORTS to deter bots & most hackers. We can also deny ROOT-Logins for Non-ROOT Users [AKA Users that neither you nor other System-Administrators]. But most importantly you can disable PASSWORD-AUTHENTICATION inorder to make sure that you & others can login via SSH-KEYS ONLY

So now in order to confirm & update the remote-server with your new settings/configurations just simply RESTART & check the STATUS of the SSH-Server via your Init-System+SSHD