I have setup public/private key methodology for use with SSH. This is the typical implementation, create the key pair, push the public key to the remote host. Old school to be sure..
ssh-keygen -t rsa ssh-copy-id myname@somehost
Then I try to run a command via an exec node.
ssh firstname.lastname@example.org systemctl restart nodered
At the CLI in a terminal window on a Linux system this works just fine. It is only when I try to execute it in an exec node I get the following...
Command failed: ssh email@example.com systemctl restart nodered Permission denied, please try again. Permission denied, please try again. firstname.lastname@example.org: Permission denied (publickey,password).
And the return code is 255. Is the exec node parsing something wrong? Not sure why this is failing, when it works fine from the CLI.
And before someone asks, whey not just send the command over MQTT to the remote system and then use exec node in local environment to run the command? Well, given the nature of the commands that may be run, I can't rely on the broker being active.