How to enable SSH server in recovery mode?

How to enable SSH server in Ubuntu 10.10 Desktop Edition recovery mode? My display is not working (broken video card). So how can I do that "blindly"? :)


Solution 1:

If you know what you're typing onto, it's just one simple command, but I'll explain the complete procedure to rule out any and all errors.

  1. Boot up the machine, holding down Shift

  2. When you're sure the grub menu is up, press Down then Return*

  3. Press Down six times to select "Drop to root shell prompt" and hit Return

  4. Carefully type apt-get install openssh-server and hit Return

  5. Carefully type /etc/init.d/ssh start and hit Return to start it without rebooting

The last step may not be required, but it doesn't hurt either.

*: Assuming your second boot entry is the recovery mode of the newest kernel, this may vary if you've manually put a Windows boot entry on top of the list or something like that, I assume you know.

If you decide to try "ssh" instead of "openssh-server", you may have to press "Y" to confirm. However, you don't need to enter the password if you drop to a root shell. After waiting long enough (!), hit Ctrl+C in case you didn't need to put in the "Y" before you continue.