I would like to control my Mycroft (www.mycroft.ai) smart speaker from Home Assistant. For instance I would like to have a switch in Home Assistant to turn on and off the radio.
I tried to do so using a shell command from Home Assistant, but somewhere I make an error with the SSH authorization. This is what I did:
- I have two Raspberry Pi’s: one with Home Assistant running on Hassio, the other one with Picroft.
- I generated a SSH private and public key using shell commands in Home Assistant. After this I have two new files in my config folder, namely ‘my.key.pub’ and ‘my.key’*.
- I copied the content of ‘my.key.pub’ from Home Assistant into Mycroft, assuming that I would be able to SSH from Home Assistant into Mycroft with shell commands.
- I created this shell command into Home Assistant: ‘ssh xx@192… /home/pi/mycroft-core/bin/mycroft-say-to stop’ to stop the current task in Mycroft.
- If I try to use this command I get the following error: Error running command:
ssh xx@192... /home/pi/mycroft-core/bin/mycroft-say-to stop
, return code: 255’, so I guess there is an authentication error or so.
If I do the same from my Linux-computer everything works. What do I do wrong? Should I perhaps define my keys in the configuration.yaml file or so? If so how? Thanks a lot in advance.
*I used this topic as inspiration: https://www.reddit.com/r/homeassistant/comments/6yldgt/how_to_add_ssh_key_for_hassio/