Ssh command_line & switch: keep getting errors

Have been searching & trying quite a lot but cannot get it to function so could use some help.
I want to be able to turn on/off the display of a remote RPi with an automation.

This is the config:

# RPi screen on/off
  - platform: command_line
        command_off: "ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no -q [email protected] 'echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power'"
        command_on: "/usr/bin/ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no -q [email protected] 'echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power'"

This works form the HA console but whatever I do I keep getting the same error message.
I have created the ssh key and copied to the remote host.

Any idea what might be wrong here?