{"id":13585091,"url":"https://github.com/AlexxIT/SSHCommand","last_synced_at":"2025-04-07T06:32:34.893Z","repository":{"id":47410579,"uuid":"247317050","full_name":"AlexxIT/SSHCommand","owner":"AlexxIT","description":"Run any SSH command on remote server from Home Assistant service call","archived":false,"fork":false,"pushed_at":"2024-12-07T07:28:11.000Z","size":33,"stargazers_count":107,"open_issues_count":6,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T01:11:18.320Z","etag":null,"topics":["home-assistant"],"latest_commit_sha":null,"homepage":"https://github.com/AlexxIT/Blog","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexxIT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-14T16:56:56.000Z","updated_at":"2025-04-02T18:04:47.000Z","dependencies_parsed_at":"2024-10-03T11:41:56.115Z","dependency_job_id":"83d6251b-eeae-404f-8174-ea90c192da43","html_url":"https://github.com/AlexxIT/SSHCommand","commit_stats":{"total_commits":19,"total_committers":5,"mean_commits":3.8,"dds":0.3157894736842105,"last_synced_commit":"e6b50e9a615ece31bbeb747d038cb91fb7b56ab9"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2FSSHCommand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2FSSHCommand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2FSSHCommand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexxIT%2FSSHCommand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexxIT","download_url":"https://codeload.github.com/AlexxIT/SSHCommand/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247607370,"owners_count":20965942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["home-assistant"],"created_at":"2024-08-01T15:04:44.318Z","updated_at":"2025-04-07T06:32:34.887Z","avatar_url":"https://github.com/AlexxIT.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# SSHCommand for Home Assistant\n\nRun any SSH command on remote server from [Home Assistant](https://www.home-assistant.io/) service call. For example, the command on the main host from the docker container.\n\n## Installation\n\n[HACS](https://hacs.xyz/) custom repository: `AlexxIT/SSHCommand`.\n\n[![](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=AlexxIT\u0026repository=SSHCommand\u0026category=Integration)\n\nOr manually copy `ssh_command` folder from [latest release](https://github.com/AlexxIT/SSHCommand/releases/latest) to `/config/custom_components` folder.\n\n## Configuration\n\nAdd integration via Home Assistant UI or `configuration.yaml`.\n\n[![](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=ssh_command)\n\n## Usage\n\nNew service `ssh_command.exec_command`:\n\n```yaml\nscript:\n  run_on_host:\n    alias: Run shell command on host\n    sequence:\n    - service: ssh_command.exec_command\n      data:\n        host: 192.168.1.123\n        port: 22\n        user: pi\n        pass: raspberry\n        command: ls -la\n```\n\nAdvanced usage:\n\n```yaml\nscript:\n  run_on_host:\n    alias: Run shell command on host\n    sequence:\n    - service: ssh_command.exec_command\n      data:\n        host: 192.168.1.123              # required hostname\n        user: pi                         # required username\n        pass: secret                     # optional password\n        private_key: /config/ssh/id_rsa  # optional private key filename\n        passphrase: secret               # optional private key passphrase\n        timeout: 5                       # optional timeout\n        command:                         # also support multiple commands\n          - touch somefile.tmp\n          - ls -la\n```\n\nIf you want use secrets or change default values, add them to `configuration.yaml`:\n\n```yaml\nssh_command:\n  host: 192.168.1.123\n  port: 22\n  user: pi\n  pass: !secret ssh_parssword\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexxIT%2FSSHCommand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexxIT%2FSSHCommand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexxIT%2FSSHCommand/lists"}