I followed a guide to generate and install keys to a remote server from Home Assistant. When I use the root user in Terminal, HA SSH connects to the remote server without any issues. In Node Red Exec Node, it throws the following error:
When you connected from root in the terminal you were probably asked to accept a key.
You need to accept that key for the Node Red user too, but I have no idea how that is done.
Thanks @Mikefila – is there a way to get the response from the shell script into Node RED for further manipulation? I am trying to get the free disk space of a remote server, so I want to get the % into HA.
I just use it to reboot pi’s so I never set up a return. I believe you can use a commend line sensor in HA to get the return value, then it’s like any other sensor
Phenomenal help, thanks @Mikefila. I wasn’t even aware of such a command. One step closer to what I want to achieve now… Here’s another issue: although the ssh command runs successfully in Terminal in HA, the command fails when I runs as a command_line sensor. Logs aren’t particularly helpful. Any ways to test this?