/SSHCommand

SSH exec service for Home Assistant

Primary LanguagePython

SSHCommand for Home Assistant

hacs_badge

This Home Assistant service allows you to run SSH commands on remote host. Example main host from Docker container with Hass.

Installation

Method 1. HACS custom repo:

HACS > Integrations > 3 dots (upper top corner) > Custom repositories > URL: AlexxIT/SSHCommand, Category: Integration > Add > wait > SSHCommand > Install

Method 2. Manually copy ssh_command folder from latest release to /config/custom_components folder.

Configuration

Method 1. GUI:

Configuration > Integrations > Add Integration > SSHCommand

If the integration is not in the list, you need to clear the browser cache.

Method 2. YAML:

ssh_command:

Usage

New service ssh_command.exec_command:

script:
  run_on_host:
    alias: Run shell command on host
    sequence:
    - service: ssh_command.exec_command
      data:
        host: 192.168.1.123
        user: pi
        pass: raspberry
        command: ls -la