Skip to main content
deleted 12 characters in body
Source Link
dirdi
  • 3.3k
  • 17
  • 35

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Alternative approach: You could also try to mount the disk image into the hypervisor'shost's file system. However, the necessary steps for this approach depend on the hypervisor'shost's OS and the file type of the disk image (.vdi, .vhd, .vmdk, ...).

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Alternative approach: You could also try to mount the disk image into the hypervisor's file system. However, the necessary steps for this approach depend on the hypervisor's OS and the file type of the disk image (.vdi, .vhd, .vmdk, ...).

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Alternative approach: You could also try to mount the disk image into the host's file system. However, the necessary steps for this approach depend on the host's OS and the file type of the disk image (.vdi, .vhd, .vmdk, ...).

added 246 characters in body
Source Link
dirdi
  • 3.3k
  • 17
  • 35

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen in the future again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Alternative approach: You could also try to mount the disk image into the hypervisor's file system. However, the necessary steps for this approach depend on the hypervisor's OS and the file type of the disk image (.vdi, .vhd, .vmdk, ...).

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen in the future again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Alternative approach: You could also try to mount the disk image into the hypervisor's file system. However, the necessary steps for this approach depend on the hypervisor's OS and the file type of the disk image (.vdi, .vhd, .vmdk, ...).

added 317 characters in body
Source Link
dirdi
  • 3.3k
  • 17
  • 35

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen in the future again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

Step-by-step Guide:

  • Download a linux live CD, e.g. Debian
  • Make sure your VM prefers to boot from its virtual Optical drive: Boot order
  • Insert the downloaded image into the drive: Optical drive
  • (Re)Start the VM to boot into the live system.
  • Start a terminal.
  • Mount the VM's virtual hard drive:
$ sudo su
# mkdir -p /mnt/drive
# mount /dev/sda /mnt/drive
  • Finally, correct the errors inside the VM:
# nano /mnt/drive/home/<USER>/.ssh/config
# nano /mnt/drive/etc/ssh/ssh_config
# nano /mnt/drive/etc/ssh/sshd_config

To prevent this to happen in the future again, always keep one ssh connection open, until you have verified that the new configuration works. You can verify by restarting the sshd service and establishing a second session in parallel (restarting the sshd daemon does not terminate an established ssh session)!

added 31 characters in body; added 77 characters in body
Source Link
dirdi
  • 3.3k
  • 17
  • 35
Loading
Source Link
dirdi
  • 3.3k
  • 17
  • 35
Loading