Last Updated: Dec 01, 2025
Introduction
This article addresses issue related to obtaining root access on Crusoe Cloud VMs and logging in directly using root user. During VM provisioning via the Crusoe Cloud UI console, SSH keys are automatically associated with the ubuntu default user, this user is granted sudo privileges to execute root-level commands.
Note: The default user for all ubuntu based images is ubuntu. root access is considered to be deprecated, and you will be warned on login.
Prerequisites
- A VM provisioned with the
ubuntuuser as the default account - SSH keys provided for user authentication
Step-by-Step Instructions
-
SSH in to the VM using the
ubuntuuser and the associated SSH key.ssh -i <ssh-key> ubuntu@<server-ip> -
Use the
sudo sucommand to switch to therootuser .sudo su -
Navigate to the
rootuser’s.sshdirectory.cd /root/.ssh -
If the
.sshdirectory does not exist, create it:mkdir -p /root/.ssh && chmod 700 /root/.ssh -
Open the
authorized_keysfile in a text editor and append the provided SSH key, then save and exit the editor .vi authorized_keys ssh-rsa SDLNKDFNDSKJNF..... -
Set the appropriate permissions for the file:
chmod 600 authorized_keys Open a new terminal session and log in directly as the
rootuser using the SSH key.
Note:
- Ensure that all changes to SSH configuration maintain security best practices.
- We recommend using the Crusoe CLI for streamlined VM and resource management.
- Mismanagement of root access or SSH keys can lead to security vulnerabilities. Always back up critical configuration files before making changes.