Page 1 of 1

Should it be possible to shutdown a PC using an ESP32 ?

Posted: Mon Jul 19, 2021 1:56 pm
by GeorgeFlorian1
Hello.

I am trying to shutdown a PC that runs Linux using an ESP32. The ESP32 should be in softAP() mode and the PC should be connected to it.

I've thought of using https://github.com/ewpa/LibSSH-ESP32 to establish a SSH Connection and send a command, but I am unable to figure out how to use that library. There are no guides.

Next, I've thought of using TCP or UDP to send something to an opened port on the PC and run a script based on what I've received. I have no idea if this is possible.

Finally, I am wondering if a HTTP solution can be applied. But I have no idea where to begin to look.

What do you think ?
Thank you.

Re: Should it be possible to shutdown a PC using an ESP32 ?

Posted: Wed Jul 21, 2021 1:20 pm
by mbratch
You'd need a task running on Linux reading a socket and that has elevated permissions enabling it to do a shutdown. Not very secure.