Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Ubuntu 12.04 Virtual Machine running in cloud and the only way I can connect to it, is via SSH using Putty. If I want to boot Ubuntu in recovery mode, is it possible to create some kind of script and push over SSH to reboot Ubuntu Virtual Machine in recovery mode?

share|improve this question
If you only have access to the VM via ssh, you will not be able to access it once it's in recovery mode. Is this what you want? – ephsmith Jul 5 '12 at 22:49
I think you are right. looks like there is no solution or trick to get the way I want. – AvkashChauhan Jul 5 '12 at 23:10
I found this link but it still needed machine access to start ssh first before connecting it:… – AvkashChauhan Jul 5 '12 at 23:24
Out of curiosity, why do you think you need to be booted into recovery mode? Couldn't you just adjust the system so it boots a livecd, or mount the virtual disk from another instance? – Zoredache Jul 6 '12 at 0:07
You can not do that. You need a console provided by your provider. If ssh is started on the system, it means the system already booted. – vimdude Jul 14 '13 at 13:53

try shutdown now

This will set the system into maintenance state/single-user mode. Unfortunately, this might also sever your connection.

share|improve this answer
Just a shot in the dark but I think you can add networking and ssh to your boot runlevel(think it's 1) and then do a telinit 1 or as mentioned shutdown now. – Wilhelm Erasmus Mar 29 '15 at 13:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .