How to work with the rescue system

If you got error connection from localhost to remote host such as below :

~$ ssh root@yourIP
ssh: connect to host yourIP port 22: Connection timed out

Inside Server  Management click button Start Rescue Mode

Your server will be rebooted and boot the rescue image from the network

If the boot process finished, you can connect to the server via SSH (any possible error messages from your SSH client can be ignored).

Reload your web page and you can see :

Rescue-Modus
Username root
Password your password

Try to connect to host again via SSH

~$ ssh root@yourIP
The authenticity of host ‘yourIP (yourIP)’ can’t be established.
ECDSA key fingerprint is SHA256:lZ+8QbqFQeX5XWrWCIRcJiQNA6OK9oRCHBorX+2/CJU.
Are you sure you want to continue connecting (yes/no)? yes

 

The rescue system does not mount your drives automatically – You will have to do it manually; This happens via the “mount” command. Normally the system is located on the second partition on the first hard drive, Linux specific it would be named /dev/hda2 or /dev/sda2 , the command would be:
mount /dev/hda2 /mnt
or
mount /dev/sda2 /mnt

The software raid device is normally called /dev/md0 . If the raid is degraded, the devices splits into /dev/md126 and /dev/md127 .

The hard drives content can be found in the /mnt directory. You can do changes on the system or download files via SCP (for example with WinSCP).

Please notice that the rescue mode will be active as long as you deactivate it.

The rescue mode use operating system Debian

root@grml ~ # fdisk -l

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0006948f

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4095 2048 1M 83 Linux
/dev/sda2 4096 16005119 16001024 7.6G fd Linux raid autodetect
/dev/sda3 * 16005120 18006015 2000896 977M fd Linux raid autodetect
/dev/sda4 18006016 1953523711 1935517696 922.9G fd Linux raid autodetect

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0007233d

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 4095 2048 1M 82 Linux swap / Solaris
/dev/sdb2 4096 16005119 16001024 7.6G fd Linux raid autodetect
/dev/sdb3 * 16005120 18006015 2000896 977M fd Linux raid autodetect
/dev/sdb4 18006016 1953523711 1935517696 922.9G fd Linux raid autodetect

Disk /dev/loop0: 420.8 MiB, 441192448 bytes, 861704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md127: 976.4 MiB, 1023868928 bytes, 1999744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md126: 15.3 GiB, 16384000000 bytes, 32000000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk /dev/md125: 922.8 GiB, 990850646016 bytes, 1935255168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
root@grml ~ # mount /dev/md125 /mnt
root@grml ~ # ls /mnt -ahl
total 104K
drwxr-xr-x 22 root root 4.0K May 15 10:55 .
drwxr-xr-x 33 root root 280 May 15 14:07 ..
drwxr-xr-x 2 root root 4.0K May 15 10:26 bin
drwxr-xr-x 2 root root 4.0K May 14 23:17 boot
drwxr-xr-x 3 root root 4.0K May 14 23:19 dev
drwxr-xr-x 90 root root 4.0K May 15 12:24 etc
drwxr-xr-x 2 root root 4.0K Apr 10 2014 home
lrwxrwxrwx 1 root root 34 May 14 23:22 initrd.img.old -> boot/initrd.img-3.13.0-147-generic
drwxr-xr-x 23 root root 4.0K May 15 10:55 lib
drwxr-xr-x 2 root root 4.0K May 15 10:16 lib64
drwx—— 2 root root 16K May 14 23:17 lost+found
drwxr-xr-x 2 root root 4.0K May 14 23:17 media
drwxr-xr-x 2 root root 4.0K May 15 10:15 mnt
drwxr-xr-x 2 root root 4.0K May 14 23:17 opt
drwxr-xr-x 2 root root 4.0K Apr 10 2014 proc
drwx—— 4 root root 4.0K May 15 13:16 root
drwxr-xr-x 2 root root 4.0K May 14 23:33 run
drwxr-xr-x 2 root root 12K May 15 10:27 sbin
drwxr-xr-x 2 root root 4.0K May 14 23:17 srv
drwxr-xr-x 2 root root 4.0K Mar 13 2014 sys
drwxrwxrwt 8 root root 4.0K May 15 13:45 tmp
drwxr-xr-x 10 root root 4.0K May 14 23:17 usr
drwxr-xr-x 11 root root 4.0K May 14 23:17 var
lrwxrwxrwx 1 root root 31 May 14 23:22 vmlinuz.old -> boot/vmlinuz-3.13.0-147-generic
root@grml ~ # vi /mnt/etc/network/interfaces

Edit your interfaces file to fix your  network error connection. Save file with press :wq    Enter

root@grml ~ # umount /dev/md125 /mnt
umount: /mnt: not mounted
32 root@grml ~ # ls /mnt -ahl
total 0
drwxr-xr-x 2 root root 3 Apr 26 2015 .
drwxr-xr-x 33 root root 280 May 15 14:07 ..
root@grml ~ #

Go to Server Management and click Stop Rescue Mode

quit rescue mode server

 

retrieved rescue mode

After click  restart button try to connect to host again via SSH.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

~$ ssh-keygen -f “/home/yourlocaldirectory/.ssh/known_hosts” -R “yourIP”
# Host yourIP found: line 15
/home/yourlocaldirectory/.ssh/known_hosts updated.
Original contents retained as /home/yourlocaldirectory/.ssh/known_hosts.old

~$ ssh root@yourIP
The authenticity of host ‘yourIP (yourIP)’ can’t be established.
ECDSA key fingerprint is SHA256:oqWPHDRSHWQ0TGtNhgw2xg23/fJ2GsecRjgGkmo40G0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘yourIP’ (ECDSA) to the list of known hosts.
root@yourIP’s password:
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 3.13.0-147-generic x86_64)