Hi,
Sorry to bother but this is driving me crazy.
I have an Installation of Home Assistant with remote shell commands that’s working fine. Now I’m moving to other system and can’t execute that same commands:
Sample:
configuration.yaml
shell_command:
turn_on_qbt: ssh -o UserKnownHostsFile=/config/.ssh/known_hosts -o StrictHostKeyChecking=accept-new -i /config/.ssh/id_rsa [email protected] qbittorrent-nox &
turn_off_qbt: ssh -o UserKnownHostsFile=/config/.ssh/known_hosts -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [email protected] pkill qbittorrent-nox
I had generated the ssh key, copy it co /config/.ssh and to the remote system.
If I execute it via shell it executes correctly:
But if I run this Automation:
alias: 06 Switch qBT Off
description: ‘’
trigger:
- entity_id: input_boolean.qbittorrent
platform: state
to: ‘off’
condition: []
action: - data: {}
service: shell_command.turn_off_qbt
This happens:
2021-12-08 16:01:10 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: ssh -o UserKnownHostsFile=/config/.ssh/known_hosts -o StrictHostKeyChecking=no -i /config/.ssh/id_rsa [email protected] pkill qbittorrent-nox
, return code: 255
I can’t run one single remote ssh command. What’s wrong?
Thanks
EDIT: Solved. Some mess with the keys. Sorry.