OVH Cloud – Lost SSH Key or SSH Key Doesn’t Work
Login in Rescue Mode
Access your OVH Cloud server in rescue mode from the OVH control panel. This allows you to repair your system even if normal SSH access is unavailable.
Identify and Mount the Root Partition
Once logged in via rescue mode SSH, run the following commands to locate and mount your root partition:
These commands will:
Identify your main root partition.
Create a temporary mount directory.
Mount and switch the environment to your system’s root.
Reset the Password
Set or reset your root password using:
Enter and confirm a new password when prompted.
Edit the SSH Configuration
Navigate to the SSH configuration directory and open the configuration file:
Ensure that the following lines are set correctly to allow password-based login if needed:
Save and exit, then restart SSH once you reboot back into normal mode.