Remote shutdown alternatives?

I use my RasPi with DietPi as a file/media server between some other uses. When time to shut it down arrives, I ssh into it and issue a “sudo shutdown” command.

That solution is not wife friendly, so I was looking for options for a simple, web based shutdown feature and found:

Are there any other alternative around? Any preference for the ones listed above?
Thx, Wolf.

If you have a L**P webserver stack installed, you could create a basic php page to shutdown the system: https://yatb.giacomodrago.com/en/post/10/shutdown-linux-system-from-within-php-script.html

I think some of the DietPi-Software system stat programs have a shutdown feature built-in. Its been a while, so i’am not sure which ones have the feature, and/or if the shutdown feature will work: https://dietpi.com/forum/t/dietpi-software-details-for-all-installation-options/22/1

Another option, if using windows, download Putty or Kitty SSH client. You can save the SSH user/pw settings for each system. All the user would need to do is double click the saved item, get automatically logged in, then type the shutdown command :wink:

Hi,

If you use “KiTTY” , you can configure a Auto-login plus an automatic command and a shot-cut to direct execute this save session. Without typing anything or to close terminal windows.

KiTTY : - KiTTY

KiTTY : Automatic password - KiTTY


KiTTY : Automatic command - KiTTY

KiTTY : command-line option -

 "kitty.exe -load "Session Name"" # Open a session automatic


shutdown.jpg

Thanks guys for the comments. I was veering more into a browser based solution (the idea is for my wife to shutdown the RasPi using a phone browser from the internal home network only) rather than bind the command to a PC based solution; and due I try to be resource conscious in terms of packages installation, I’ll try to avoid setting up a L**P server just for this feature.

I’ll probably settle trying to develop an extension to something I have installed already. We’ve discussed using RPI-Monitor for that feature a while ago (https://github.com/Fourdee/DietPi/issues/238#issuecomment-203043241) but I couldn’t make it work (I can’t even get shellinabox to work… grrr)

Anyways, I’ll make sure to contribute it back if I found a suitable solution.
Thanks! Wolf.

Very nice, great guide!
I didn’t know that feature existed and i’ve been using Kitty, pretty much daily for years lol.

Hi Wolf,

Hmm … I have tested it referred to the how-to, which is link in my GitHub posting: Shell In A Box - Access Linux SSH Terminal via Web Browser or use this: http://rasptorial.com/monitor/rpi-monitor

I don’t like to have shell-in-a-box root login, so I adduser for example “odroid”.

Browser based => use Pi Control für Deinen Raspberry Pi - Willy's Technik-Blog (Version: 1.3.3) like I have described in the GitHub posting .
Your wife smart phone has running android?
pi-control has as well a Android App: https://play.google.com/store/apps/details?id=de.willytech.picontrol

Or a alternative way is to use a tv-remote control with e.g. Flirc USB - Flirc
No driver or additional software is need for this and flirc can acts as a keyboard.

example:
Modifying Ctrl+Alt+Del behavior = ctrl-alt-del.target => poweroff
Program in Flirc GUI ( https://flirc.zendesk.com/hc/en-us/articles/202980419-How-to-set-up-Flirc ) any ir-remote button as “Ctrl+Alt+Del”

Or a hardware button switch with a Python script: http://www.instructables.com/id/Simple-Raspberry-Pi-Shutdown-Button/?ALLSTEPS

Good tips, thx K-plan. I’ll try the suggestions and report it back.