Find us on social media
Create a user with sudo permissions
Create a user with administrator privileges to operate your VPS without using root directly.
Using root directly is a security risk. Create a personal user with administrator privileges to operate your VPS safely.
Step 1 — Create the user
Connect as root and run:
adduser deployThe system asks for a password and optional details (name, phone). Complete the password and leave the rest empty.
Step 2 — Add to the sudo group
usermod -aG sudo deployThis grants administrator permissions to the deploy user.
Step 3 — Verify permissions
Switch to the new user and test sudo:
su - deploy
sudo whoamiIf it returns root, permissions are configured correctly.
Step 4 — Configure SSH access for the new user
From your local machine, copy your public key:
ssh-copy-id deploy@YOUR_VPS_IPIf you don't have an SSH key, generate one first:
ssh-keygen -t ed25519 -C "your-email@example.com"Step 5 — Disable root SSH access (recommended)
Edit the SSH configuration:
sudo nano /etc/ssh/sshd_configFind and modify:
PermitRootLogin noRestart the service:
sudo systemctl restart sshdImportant
Before closing the root session, verify you can connect with the new user in another terminal. If something goes wrong, you still have access from the VNC console in the Baires Host panel.