I want to run a command remotely on another Linux machine via SSH and save the result in an entity.
I used the following command, which works wonderfully in the SSH terminal in HA:
Thank you for this. It worked!! I had been working on it for hours. I had to modify it for my system. The .ssh folder on my system (HASS OS) is a subdirectory of the home directory. I ended up making a new directory config/.ssh/ to save the key. I also had a problem of shell_command finding my script. I put it in a subdirectory config/shell_scripts and the line under shell_command:
my_sciript: shell_scripts/my-script.sh