I am using a shutdown timer to shutdown my computer after I fall asleep. Sometimes I forget to activate the timer so I downloaded a phone app that can send an ssh command to my computer to do the shutdown.
The ssh connection works fine but the shutdown command does not work showing this error:
Failed to set wall message, ignoring: Interactive authentication required. Failed to power off system via logind: Interactive authentication required. Failed to open initctl fifo: Permission denied Failed to talk to init daemon.
If I manually ssh in I can shutdown as long as I enter my password interactively.
My question is this: How can I use the shutdown/poweroff command from ssh in a non-interactive way?