I can do whatever i want i can not bring Hassio to run my command. I tried lot of things like setting chown to root or root:root set commands in script files or direct into hassio
The only thing that works is the data > /config/bin/data.txt command in hassio, but running that from my script does not work. The ssh command is working over terminal in hassio but not in hassio itself.
Copy your .ssh folder to “/config/.ssh/” instead and execute the shell_command like this:
turn_off_TARGET: ‘ssh -i “/config/.ssh/id_rsa” hass@TARGET “shutdown.exe -h now”’
This of course implies that you’ve properly configured the TARGET for autologin and trusted it, but it’s working for me.
I troubleshoot my shell_commands as follows:
First i login with ssh to my home assistant device and try to run that shell command from there.
If it doesn’t work, i have found the issue and will troubleshoot there.
If it works on ssh it is most likely a permissions problem, so checking with ls -al if my hass-user has permissions to execute my command (i mostly use .sh files to run my commands). If that is all set right all that is left is a spelling problem in my config.yaml