Recovery Reboot
Booting an SSD VPS into recovery mode starts your virtual server from a separate Ubuntu recovery image instead of your installed operating system. Your server’s disk is left untouched and is available to mount from within the recovery environment, allowing you to troubleshoot and repair your system. Recovery mode is useful for tasks such as:
- Fixing boot errors or a broken
/etc/fstab - Regaining access after losing an SSH key or breaking your SSH or firewall configuration
- Resetting a user’s password
- Copying important data off the server
How to log in to the recovery image
Section titled “How to log in to the recovery image”There are two ways to log in to the recovery image:
| User | Credential | Available for |
|---|---|---|
ubuntu |
Your server’s SSH key | Servers deployed with an SSH key |
root |
A temporary password created for the recovery image | All servers, including servers deployed without an SSH key |
You can use either login over SSH, or from the Console tab on your server’s page. The temporary password is shown on your server’s page while it is in recovery mode.
Step 1: Boot into recovery mode
Section titled “Step 1: Boot into recovery mode”-
To perform a Recovery Reboot on a server, navigate to the relevant server page, select Server Actions and choose Recovery Reboot.
-
You will be presented with a confirmation dialogue. Select Recovery Reboot again to confirm the action.
-
Once complete, a green pop-up message will confirm the success of the action.
-
On the server’s Server Information tab, a recovery mode box shows how to log in, including the temporary password. Select the eye icon to reveal it, or the copy icon to copy it.
Get Server ID and Location ID
Section titled “Get Server ID and Location ID”curl --request GET \--url https://api.ingenuitycloudservices.com/rest-api/ssd-vps/servers \--header 'Accept: application/json' \--header 'X-Api-Token: API_KEY'Recovery Reboot
Section titled “Recovery Reboot”curl --request POST \ --url https://api.ingenuitycloudservices.com/rest-api/ssd-vps/locations/{location_id}/servers/{server_id}/power/recovery-reboot \ --header 'Accept: application/json' \ --header 'X-Api-Token: API_KEY'Get the temporary password
Section titled “Get the temporary password”Once the server is in recovery mode, the server details include the temporary password in the rescue_password field. The field is empty when the server is not in recovery mode.
curl --request GET \--url https://api.ingenuitycloudservices.com/rest-api/ssd-vps/locations/{location_id}/servers/{server_id} \--header 'Accept: application/json' \--header 'X-Api-Token: API_KEY'Step 2: Connect to the recovery image
Section titled “Step 2: Connect to the recovery image”Once the server has booted into recovery mode, connect over SSH using your server’s public IP address. The examples below use 203.0.113.10 as the server IP.
With your SSH key, connect as the ubuntu user:
ssh ubuntu@203.0.113.10If your key is not in the default location, specify it with -i:
ssh -i ~/.ssh/my_key ubuntu@203.0.113.10The ubuntu user has sudo privileges. Switch to a root shell to carry out recovery tasks:
sudo -iWith the temporary password, connect as root and enter the password when prompted:
ssh root@203.0.113.10SSH uses port 22, so make sure your server’s firewall allows it from where you connect. If you can’t connect over SSH, log in from the Console tab on your server’s page instead.
Step 3: Mount your server’s disk
Section titled “Step 3: Mount your server’s disk”Your server’s disk is attached to the recovery image as a second disk, usually /dev/vdb. It is not mounted automatically. First, identify it:
lsblk -fThe output lists each disk and its partitions along with their filesystem types. Your server’s root filesystem is usually the largest ext4 or xfs partition on vdb. The device names below (such as /dev/vdb1) are examples, so use the names shown in your own lsblk output.
Mount the root partition:
mount /dev/vdb1 /mntYour server’s files are now available under /mnt.
Step 4: Fix the problem
Section titled “Step 4: Fix the problem”The examples below cover common recovery tasks.
Add a new SSH key
Section titled “Add a new SSH key”If you have lost the private key for your server, or your server was deployed without one, add a public key to the authorized_keys file on your server’s disk.
For the root user:
mkdir -p /mnt/root/.sshecho "ssh-ed25519 AAAAC3Nza... you@example.com" >> /mnt/root/.ssh/authorized_keyschmod 700 /mnt/root/.sshchmod 600 /mnt/root/.ssh/authorized_keysFor your server’s default user, replace ubuntu with its username (for example debian):
mkdir -p /mnt/home/ubuntu/.sshecho "ssh-ed25519 AAAAC3Nza... you@example.com" >> /mnt/home/ubuntu/.ssh/authorized_keyschmod 700 /mnt/home/ubuntu/.sshchmod 600 /mnt/home/ubuntu/.ssh/authorized_keysIf you created the .ssh directory, give it to the user. Use the numeric user and group IDs from /mnt/etc/passwd, because the recovery image has different users to your server:
grep ubuntu /mnt/etc/passwd # e.g. ubuntu:x:1000:1000:...chown -R 1000:1000 /mnt/home/ubuntu/.sshRun commands inside your installed system (chroot)
Section titled “Run commands inside your installed system (chroot)”To run commands as if you were logged in to your normal operating system, for example to reset a password or reinstall a package, chroot into the mounted disk:
for d in dev proc sys; do mount --bind /$d /mnt/$d; donechroot /mnt
# Examples:passwd root # reset your server's root passwordpasswd ubuntu # reset a user's passwordnano /etc/fstab # fix a broken fstab entry
exit # leave the chroot when finishedCopy data off the server
Section titled “Copy data off the server”From your local computer, use scp or rsync to download files from the mounted disk. Logging in as root with the temporary password lets you copy any file:
scp -r root@203.0.113.10:/mnt/home/ubuntu/important-data ./If you copy as the ubuntu user instead, files only readable by root may need to be copied to a location the ubuntu user can read first, or have their permissions adjusted, before downloading.
Step 5: Return to your normal operating system
Section titled “Step 5: Return to your normal operating system”When you have finished, unmount the disk:
umount -R /mntThen perform a normal Reboot from the control panel or API to boot back into your installed operating system. See Power Actions. The temporary password stops working at this point.
Once the server is back online, log in as usual. If you see a host key warning, run ssh-keygen -R <server-ip> as described above.
If you are unable to recover your server, please contact our support team.