Skip to main content
Running everything as root is convenient and dangerous. A single typo can wipe your server, and any process you launch inherits full system privileges. The standard practice is to create a regular user, grant it sudo, and use root only when you really need to.

Create a new user

1

Add the user

You will be prompted for a password and some optional profile fields (press Enter to skip).
2

Grant sudo privileges

3

Test the new account

Set up SSH key access for the new user

See SSH Access for how to generate a key pair.

Disable root SSH login

Once your new user works over SSH, disable direct root login to reduce brute-force risk.
Set:
Then reload SSH:
Do not close your current root SSH session until you have confirmed you can log in as your new sudo user in a separate terminal. If something is misconfigured, that first session is your escape hatch.

Delete a user

List all users