Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95414

Run remote ssh command using command_line switch

$
0
0

@RienduPre wrote:

Hi,

I’ve read a lot of post about this functionality, but still can’t get it to work. So I like to op a new topic.

What did I do solar:
Created a switch in my switch.yaml file:

- platform: command_line
  switches:
    mm_screen:
      command_on: "ssh pi@192.168.0.190 'vcgencmd display_power 1'"
      command_off: "ssh pi@192.168.0.190 'vcgencmd display_power 0'"

I create a ssh_key file in /config and using ssh-keygen -t rsa on the HASS.IO system
Did a - ssh-copy-id pi@192.168.0.190 on the HASS.IO system to the system I want to execute the command.
The command works from ssh on the HASS>IO system

But when a switch the switch to on, I get this error.
Schermafbeelding 2020-03-30 om 13.47.32

So any help is appreciated to get this working.

Best regards,
Rien

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>