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

Ssh command in command line switch failed

$
0
0

@schlauerlauer wrote:

Hi!

I’m having trouble with a command line switch with an ssh command

this is my configuration.yaml snippet:

switch:
  - platform: command_line
    switches:
      win10:
        command_on: "ssh -i /config/.ssh/id_ed25519 ha@192.168.178.4 sudo virsh start win10"
        command_off: "ssh -i /config/.ssh/id_ed25519 ha@192.168.178.4 sudo virsh destroy win10"
        command_state: "ssh -i /config/.ssh/id_ed25519 ha@192.168.178.4 sudo virsh dominfo win10 | grep running"
        friendly_name: "Windows VM"

error message:

Command failed: ssh -i /config/.ssh/id_ed25519 ha@192.168.178.4 sudo virsh start win10

I put the ssh keys in the config directory because of this answer.
If I run the commands from the ssh terminal plugin it works just fine…

Additional Information:
Hassio 0.107.7 on RPi4

Thank you for your help!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95445

Trending Articles



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