Vultr DocsLatest Content

Associated Doc

How Do I Use an SSH Key with a Non-Root User on a Vultr Instance?

Updated on 15 September, 2025

How to configure and use SSH key authentication with a non-root user account on Vultr instances for secure access with sudo privileges


Vultr supports deploying instances with a limited non-root user, typically named linuxuser, by enabling the Limited User Login feature. This allows you to log in securely with your SSH key and elevate privileges via sudo when necessary.

To use an SSH key with a non-root user:

  1. Add an SSH public key to your Vultr account.

  2. During deployment, select the added SSH key and enable Limited User Login. This creates a non-root user (e.g., linuxuser) on the instance and injects the SSH key into that user's ~/.ssh/authorized_keys file.

  3. After deployment, log in using the assigned non-root user and the instance's public IP address:

    console
    $ ssh linuxuser@<instance_ip>
    

    Use sudo to escalate privileges when needed.

This approach improves security by minimizing root access and enforcing the principle of least privilege on your server. For detailed deployment instructions, refer to Vultr’s Limited User Login guide.