To avoid long explanations:

  1. I have an old server with old code that hosts important data ;
  2. The configuration for a new machine will take me a while ;
  3. But the old machine MUST run all the time ;
  4. The old machine crashes regularly and I have to manually turn it off and on again ;

Is there a device that allows me to remotely turn the computer off and on again by ssh (or something else) and plug it into the power switch pins ?

  • Have you considered using a raspberry pi with its GPIO hooked up to the power/reset pins?
    – Romen
    Commented Jul 2, 2019 at 15:34

1 Answer 1


If the machine actually crashes, you won't be able to SSH it in order to reboot it.

Since you say this is a server machine, your best guess would be to check how the machine is connected to the power grid. Most would be plugged into a PDU, and many PDUs can be administered socket by socket, so if the machine is unreachable, you can order the PDU to turn off, and then turn back on the specific socket. If the machine is connected directly to an UPS, you'll probably have a less granular control, i.e. you'll be able to turn on and off groups of sockets, but not individual sockets. It's up to you to determine, in this case, if there can be a reserved group just for this server.

Once the power is back on, either the server is configured to boot automatically (or you can set this option in the BIOS), or you need to use Wake-on-LAN to force it to turn on. Check with your system administrator about the security aspects of Wake-on-LAN, since in many locations, Wake-on-LAN packets would be blocked by default.

If, instead, you're talking not about a hardware server, but a virtual machine, things should be much easier: check the documentation for the virtualization technology that you use in order to know how to force reset a VM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.