After countless attempts, I've run out of ideas. Here's the situation: I want to use a switch to send the SSH command to shut down a second Raspberry Pi. To do this, I've added the following shell command to the configuration.yaml.
I installed the "Advanced SSH & Web Terminal" extension in HA. When I enter the line of code there, the command is transmitted correctly and the external Raspberry Pi shuts down.
If I use the shell command with an input helper and an automation nothing happens with the raspberry. Any ideas?
That is running it it's own environment. I am guessing it cannot find your ssh key path when you run this in the working path where the shell_command runs.
When you say /data/... I think since the working directory there is /config, so that becomes /config/data/... Shell Command - Home Assistant
The integration will try this when you put that in the command... rocrail_off: ssh -i /config/config/data/.ssh/xxx
You need to move the file or add a share to an external folder I think.
That was the right tip. I had already tried moving the .ssh folder from /data/.ssh to /root/config/.ssh. That always resulted in an error message. Once I disabled "safe mode" in the Terminal app, I was able to move the .ssh folder without any problems, and now the automation is working too. Thank you so much!