Answer the question
In order to leave comments, you need to log in
Linux: What to do with root after creating a user with normal rights?
Hello!
I actually created a user for VPS Ubuntu 18.04.3, added it to sudo, I can log in by key.
But root hasn't gone anywhere? What is the point then? The manuals say that this affects security, does it mean that I will work not as root? Or now you still need to somehow hide the root from those who want to connect to the server under the root?
Answer the question
In order to leave comments, you need to log in
Run strictly after making sure that sudo works and the ability to connect via ssh to another user.
PermitRootLogin no
in /etc/ssh/sshd_config (prohibition of root login via ssh) and sudo passwd --lock root
(prohibition of local root login by password).
What to do with root after creating a user with normal rights?
If work from under root is not expected (in 99.9% of cases it can be replaced with sudo), then it is enough to do the above: disable root in ssh and prohibit local login.
If you still need root for some reason (or at first you are afraid of working with sudo), then you can rename root to another non-standard username so that the attacker picks up not only the password, but also the login.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question