Thread #108056144 | Image & Video Expansion | Click to Play
HomeIndexCatalogAll ThreadsNew ThreadReply
H
Is there a way to set up my PC (W10) so that it would run a script (or turn it off) remotely, using a command from my phone?
My current solution is to connect through Moonlight and turn it on or off by myself, but it really is just a .bat file and sending a command through my phone would be easier
+Showing all 8 replies.
>>
set your bios options to restart on power restoration. build a little robot that pushes your power supply switch on demand.
>>
ssh username@server "shutdown -f -s -t 1"
>>
>>108056168
that's risky considering it can run literally whatever it wants through ssh
>>108056156
sorry I'm not being clear, I didn't mean to turn off the pc I meant to stop the script or run it on command
>>
>>108056596
>I didn't mean to turn off the pc I meant to stop the script or run it on command
I am sure there is a turd party program that will do exactly what you want, butt . . .
I would utilize the Task Scheduler and some super-secure FTP server. Have a task that periodically checks a specific super-secure folder attached to the FTP server for a batch file to show up and be executed. Then from the phone, I would connect to the super-secure FTP server to drop in the batch file ( that when it executes, runs your command(s) & then deletes itself ). I don't know what phone you have, but I am pretty sure they all allow access to a terminal emulator that will include the tools you need to connect and copy over a file your PC.
Let your imagination run wild, I suppose, but I just offered my solution because I think it would be cool to press an ``App'' button on the home screen and have my computer doing something automatic on the other side of the planet.
<3 Good luck
>>
>>108056596
>that's risky considering it can run literally whatever it wants through ssh
You could set a user's shell (through sshd_config) to just be a script of your choice, and then the only thing they can do when they log in through SSH is shut the system down.
Or you can use SSH keys with a passphrase, type the passphrase in whenever you want to SSH into it, and then if someone has stolen your private key and passphrase you have a lot more problems than someone just having SSH access.
If you want to get super autistic I'm sure home assistant also has something. Or wake-on-LAN. Fifty million ways to do this.
>>
>>108056144
Uh ya? Write a windows service that listens on some interface. You could make it a web page and use Windows auth from IIS as well.
>>
just set up a tiny server and send HTTP requests to it.
>>
>>108056596
oh, well do the robot thing but run the script at startup.

Reply to Thread #108056144


Supported: JPG, PNG, GIF, WebP, WebM, MP4, MP3 (max 4MB)