I’ve set up a new server using the Wordpress Ubuntu 20.04 image.
Previously with my servers I have always disabled root login for security reasons.
To do this it seems like you need to go to /etc/ssh/sshd_config and change “PermitRootLogin” from “prohibit-password” to “no”. But this line does not exist, and adding it does not stop me logging in as root, after running systemctl restart sshd.
I use SSH and don’t log into root with a password. Is it still recommended to set up another sudo user and disable root? If so, how do I do this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.