I run a VPS, on a Linux Server, with CentOS 7 (64 bits) being the chosen Operating System.
I have recently wiped the VPS, so it only has a clean install of Plesk Onyx at the moment. I would now like to disable root access to the VPS, via SSH, prior to setting up domains and emails.
To achieve this, I gained SSH access, via the PuTTY Terminal. Using the Nano Text Editor, I entered the following Command Line:
# nano /etc/ssh/sshd_config
This opened up the correct file, where I then changed the #PermitRootLogin
entry from 'yes' to 'no'; as per the following screenshot:

I was able to save and exit the file. I also was able to see that the changes were indeed saved, upon accessing the file again.
I am aware that in order for such changes to take place, the SSH Service needs restarting. To do this, I have tried the following command lines (Individually):
# service ssh reload
# sudo systemctl restart sshd.service
# sudo systemctl restart sshd
# sudo systemctl restart sshd.service
None of the above command lines, confirmed whether or not SSH was restarted. Regardless, I am still able to log into SSH using the root credentials.
Is anyone able to identify where I could be going wrong?