Thanks Micheal
The only thing running on the old OdroidC1 is motion, and as a minimal install the default user is root,
which is convenient, as systemctl need to been executed as root . What would be nice is to get some feedback the action has been completed, I did think of the process id, but it returns
forget the log line as I had that running to see if it worked, in an automation it doesn’t matter about feedback, but would be nice to have a switch in lovelace as well
the hashed line worked but was very hit and miss, I wondered if it was not reading /etc/hosts on the host computer, hence the full ip_address, but made no difference, maybe execute a shell script on the host ???
I do believe you have to put your ssh keys in your config folder under a folder called ssh_keys that you create, and then you need to reference like this:
That logs into the remote machine without asking for a password
keyname is that the name of the user that created the key, in my case on the host machine that is odroid.
I’m also using ssh on the binary_sensor to check the status, I’ll try on that , Thanks
The ssh keys have to be in the Homeassistant container, and referenced to run from there, cause it is a different environment, than the host. Also the keyname, is the name of the file that your key is called i.e. id_rsa, or what ever you named it.
It sounds like you already have the keys, made cause you said this works from the host, so just create a folder called ssh_keys in you Homeassistant config folder, and place the key in that folder. Then you should be all set using the switch config I gave you above.
hopefully this question will get it working 100%
When HA is running , where will it look for the ssh_key directory as it running in its own environment.
the path to the ssh_key directory on the host machine is /home/odroid/.homeassistant ???
if HA’s root directory is .homeassistant , then should it be
I’m So Sorry I missed this until now : ( You create a directory in you HomeAssistant config folder ( The folder that contains your automation.yaml, configuration.yaml and so ) Then you would point to you keys in that config folder:
echo `ssh -i /config/ssh/id_rsa
My keys are in the HA config folder in the ssh folder. Sorry for the tardiness.