Ssh command sintax

Hi all,
Im trying to do some commands on ssh but it seams not to work on the gui
they work fine on the cli and thats what confuses me maybe some one can clarify it for me.
here is the command on the CLI

~ $ ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -q [email protected] iocage get state Plex-PlexPass
up

But on the gui i get:

Command failed: ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -q [email protected] iocage get state Plex-PlexPass

6:20 PM components/command_line/sensor.py (ERROR) - message first occurred at 6:10 PM and shows up 3 times

Here is my sensor:

  • platform: command_line
    name: ‘Plex Server status’
    scan_interval: 300
    command: ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -q [email protected] iocage get state Plex-PlexPass

any idea what im doing wrong?

thanks

first of all, always enclose your config in backquotes when posting it here to preserve formatting.
second, have you tired enclosing the command in quotes as well (as it should be a string).
also, I presume that when you ssh to your HA and execute a command and when the same command is executed from HA is not the same thing as it has something to do with containers and/or permissions.