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

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

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

Postby GeorgeFlorian1 » Mon Jul 19, 2021 1:56 pm

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.

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

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

Postby mbratch » Wed Jul 21, 2021 1:20 pm

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.

Who is online

Users browsing this forum: No registered users and 215 guests