MCPcopy Index your code
hub / github.com/AlexxIT/SSHCommand

github.com/AlexxIT/SSHCommand @v1.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.0 ↗ · + Follow
7 symbols 22 edges 3 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SSHCommand for Home Assistant

Run any SSH command on remote server from Home Assistant service call. For example, the command on the main host from the docker container.

Installation

HACS custom repository: AlexxIT/SSHCommand.

Or manually copy ssh_command folder from latest release to /config/custom_components folder.

Configuration

Add integration via Home Assistant UI or configuration.yaml.

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
        port: 22
        user: pi
        pass: raspberry
        command: ls -la

Advanced usage:

script:
  run_on_host:
    alias: Run shell command on host
    sequence:
    - service: ssh_command.exec_command
      data:
        host: 192.168.1.123              # required hostname
        user: pi                         # required username
        pass: secret                     # optional password
        private_key: /config/ssh/id_rsa  # optional private key filename
        passphrase: secret               # optional private key passphrase
        timeout: 5                       # optional timeout
        command:                         # also support multiple commands
          - touch somefile.tmp
          - ls -la

If you want use secrets or change default values, add them to configuration.yaml:

ssh_command:
  host: 192.168.1.123
  port: 22
  user: pi
  pass: !secret ssh_parssword

Core symbols most depended-on inside this repo

async_step_user
called by 1
custom_components/ssh_command/config_flow.py
async_step_import
called by 0
custom_components/ssh_command/config_flow.py
async_setup
called by 0
custom_components/ssh_command/__init__.py
exec_command
called by 0
custom_components/ssh_command/__init__.py
async_setup_entry
called by 0
custom_components/ssh_command/__init__.py

Shape

Function 4
Method 2
Class 1

Languages

Python100%

Modules by API surface

custom_components/ssh_command/config_flow.py3 symbols
custom_components/ssh_command/__init__.py3 symbols
tests/test_backward.py1 symbols

For agents

$ claude mcp add SSHCommand \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact