I am trying to run remote commands on a server using ssh.
I have tried directly by calling a one-liner ssh command (I have setup keys between OH2 ad the remote server.
I have tried using a local local bash script that remotely ssh’s to the remote server and runs commands or scripts on the remote server.
I have also tried an expect script once again the script ssh’s to remote server and runs commands/script as required.
All of these methods work using the openhabian user on the command line, but do NOT work when using executeCommandLine.
Using executeCommandLine I can run simply local commands such as “logger Test”
The basin command in my rules looks like this
executeCommandLine ("logger Test",5000)
As per my explanation above, I have tried the following and all have failed.
// bash script to login and run a remote bash script. executeCommandLine ("update_me update_venus") // expect script that logs in remotely and runs a command executeCommandLine ("rmt_cmd 'logger Test'",5000)
I do not get an error in the openhabian.log
It is as if executeCommandLine cannot spawn a new process.
I would appreciate any tips in troubleshooting this as I have been going around in circles.