Rebooting an OVH VPS in rescue mode to repair it
1. Go to the OVHcloud control panel and to the screen that reboots the VPS in rescue mode
Section titled “1. Go to the OVHcloud control panel and to the screen that reboots the VPS in rescue mode”
After a few minutes, an e-mail arrives with the login (root) and the password of the rescue system (unless you registered your SSH key somewhere in the manager):

2. Connecting over SSH
Section titled “2. Connecting over SSH”Careful, the login in rescue mode is root!
2.1 First attempt from the console of your Linux PC (or other exotic system)
Section titled “2.1 First attempt from the console of your Linux PC (or other exotic system)”ssh root@vps-xxxxxxx.vps.ovh.netYou get:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the ECDSA key sent by the remote host isSHA256:aHD6pBYP1zHxxxxxxx7hp4KwI4yl5gr5OVmBJZ/ZBE.Please contact your system administrator.Add correct host key in /home/kiwiof09/.ssh/known_hosts to get rid of this message.Offending ECDSA key in /home/coin/.ssh/known_hosts:75 remove with: ssh-keygen -f "/home/coin/.ssh/known_hosts" -R "vps-xxxxxxx.vps.ovh.net"ECDSA host key for vps-xxxxxxx.vps.ovh.net has changed and you have requested strict checking.Host key verification failed.2.2 On your workstation, remove the host key fingerprints of the server
Section titled “2.2 On your workstation, remove the host key fingerprints of the server”ssh-keygen -f "/home/coin/.ssh/known_hosts" -R "vps-xxxxxxx.vps.ovh.net"ssh-keygen -f "/home/coin/.ssh/known_hosts" -R "51.38.yyy.yyy"ssh-keygen -f "/home/coin/.ssh/known_hosts" -R "2001:xxxx:xxx:xxxx::xxxx"2.3 New connection attempt
Section titled “2.3 New connection attempt”ssh root@vps-xxxxxxx.vps.ovh.netYou get:
The authenticity of host 'vps-xxxxxxx.vps.ovh.net (51.38.xxx.xxx)' can't be established.ECDSA key fingerprint is SHA256:aHD6pBYP1zxxxxxxxKwI4yl5gr5OVmBJZ/ZBE.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'vps-xxxxxxx.vps.ovh.net,51.38.xxx.xxx' (ECDSA) to the list of known hosts.root@vps-xxxxxxx.vps.ovh.net's password:Linux vps-xxxxxxx 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64
GNU/Linux, to the rescue!
Server: vps-xxxxxxxLogin: rootPassword: azezeazeaeazezae
root@vps-xxxxxxx:~#2.4 List the disks
Section titled “2.4 List the disks”lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 2.5G 0 disk└─sda1 8:1 0 2.5G 0 part /sdb 8:16 0 20G 0 disk└─sdb1 8:17 0 20G 0 partYou can see that the rescue disk is sda1 and that it is mounted as the root (/), but the disk of the server is sdb1!
2.5 Change your root directory so you can work inside the server
Section titled “2.5 Change your root directory so you can work inside the server”mkdir -p /mnt/sdb1mount /dev/sdb1 /mnt/sdb1mount -t proc proc /mnt/sdb1/proc/mount -t sysfs sys /mnt/sdb1/sys/mount -o bind /dev /mnt/sdb1/dev/mount -t devpts devpts /mnt/sdb1/dev/ptsmkdir -p /run/chroot/lockmount -o bind /run/chroot /mnt/sdb1/runchroot /mnt/sdb1 /bin/bashsource /etc/default/locale2.6 List the disks again
Section titled “2.6 List the disks again”lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 2.5G 0 disk└─sda1 8:1 0 2.5G 0 partsdb 8:16 0 20G 0 disk└─sdb1 8:17 0 20G 0 part /2.7 You can now repair the server
Section titled “2.7 You can now repair the server”If you run into trouble, ask for a quote.
2.8 Leave the environment and go back to the root of the rescue system
Section titled “2.8 Leave the environment and go back to the root of the rescue system”exitumount /mnt/sdb1/runumount /mnt/sdb1/dev/ptsumount /mnt/sdb1/dev/umount /mnt/sdb1/sys/umount /mnt/sdb1/proc/umount /mnt/sdb1Go back to the OVH manager to leave rescue mode
Section titled “Go back to the OVH manager to leave rescue mode”And reboot the server in normal mode:

