Disable Root SSH Login on an Anubiz Offshore VPS
The Anubiz panel ships root login because the cloud image does. Moving to a sudo-only user is a small change with a real impact - SSH brute force scanners hammer 'root' specifically, and disabling root login alone cuts attack surface massively. This guide creates a sudo user, tests sudo, then disables root SSH with a recovery plan if you mess up.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Step 1: Create the Sudo User
adduser luis, set a password, usermod -aG sudo luis. mkdir -p /home/luis/.ssh; chown -R luis:luis /home/luis/.ssh; chmod 700 /home/luis/.ssh.
Step 2: Copy Your Key
cp /root/.ssh/authorized_keys /home/luis/.ssh/; chown luis:luis /home/luis/.ssh/authorized_keys; chmod 600 /home/luis/.ssh/authorized_keys. Test ssh luis@vps-ip in a new terminal, run sudo -i, confirm root.
Step 3: Disable Root SSH
/etc/ssh/sshd_config.d/99-noroot.conf: PermitRootLogin no. sshd -t. systemctl reload ssh. From a new terminal try ssh root@vps-ip - must fail.
Step 4: Sudoers Policy
For convenience, NOPASSWD if your key has a strong passphrase: luis ALL=(ALL) NOPASSWD: ALL in /etc/sudoers.d/luis. Otherwise leave the default password prompt for audit trail.
Step 5: Recovery Plan
If you lock yourself out, open ticket. Panel has rescue boot which mounts your disk - we can re-add a key. Document the panel rescue path before you need it.
Related Services
Why Anubiz Host
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.