From bd4de0d72bbc0e8a385e523d9a9b4e3b06e4f787 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:35:42 +0000 Subject: [PATCH 1/9] Initial plan From e8d9074088cf6c4bd79e025a2ccf4943d41332fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:36:41 +0000 Subject: [PATCH 2/9] Apply remaining changes Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- README.md | 16 ++++++++++++++++ options_flow.py | 2 ++ strings.json | 32 +++++++++++++++++--------------- translations/de.json | 32 +++++++++++++++++--------------- translations/en.json | 32 +++++++++++++++++--------------- 5 files changed, 69 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 67229b6..b7b9cb1 100644 --- a/README.md +++ b/README.md @@ -385,6 +385,22 @@ Community contributions for additional languages are welcome! --- +## ❗ Error Codes + +Errors shown while adding or reconfiguring a container are prefixed with a code. + +| Code | Meaning | What to do | +|------|---------|------------| +| E001 | Neither password nor key file was provided. | Provide one of them. | +| E002 | Cannot connect to the remote host. | Check host, port and network. | +| E003 | The docker command exited with an error. | Check the docker command and that the user may run it (e.g. `sudo` or docker group). | +| E004 | The host key could not be verified. | Check the known hosts file or disable the known hosts check. | +| E005 | SSH login failed. | Check username and password/key file. | +| E006 | Host is not reachable. | Check the host address and network. | +| E007 | The connection timed out. | Check that the host is online and the port is correct. | +| E008 | The container name was not found on the host. | Check the name with `docker ps -a` on the host. | +| E009 | The docker executable was not found (exit status 127). | Non-interactive SSH sessions may not have `docker` on the `PATH` (common on QNAP/Synology NAS). Enter the absolute path as Docker Command (e.g. `/usr/bin/docker`) or symlink it into `/usr/bin`. | + ## ⚠️ Known Issues - If you are using HassOS and enable `check_known_hosts` without explicitly providing `known_hosts`, this may fail because the default known hosts file may not be accessible from within Home Assistant. Either disable host checking (not recommended) or provide `known_hosts` explicitly. diff --git a/options_flow.py b/options_flow.py index 7e65541..1d5613b 100644 --- a/options_flow.py +++ b/options_flow.py @@ -75,6 +75,8 @@ async def validate_and_build_options( user_input[CONF_HOST], exit_status, ) + if exit_status == 127: + return {}, "docker_command_not_found" return {}, "docker_command_failed" except ServiceValidationError as exc: translation_key = exc.translation_key if hasattr(exc, "translation_key") else "cannot_connect" diff --git a/strings.json b/strings.json index c294aef..6de4982 100644 --- a/strings.json +++ b/strings.json @@ -37,14 +37,15 @@ } }, "error": { - "password_or_key_file_required": "Either password or key file must be provided.", - "cannot_connect": "Cannot connect to the remote host.", - "docker_command_failed": "The docker command failed. Check the docker command and permissions.", - "host_key_not_verifiable": "The host key could not be verified.", - "login_failed": "SSH login failed. Check username and password/key file.", - "host_not_reachable": "Host is not reachable.", - "connection_timed_out": "Connection to the host timed out.", - "docker_service_not_found": "The service name was not found on the remote host. Check the name and make sure the container exists." + "password_or_key_file_required": "[E001] Either password or key file must be provided.", + "cannot_connect": "[E002] Cannot connect to the remote host.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "host_key_not_verifiable": "[E004] The host key could not be verified.", + "login_failed": "[E005] SSH login failed. Check username and password/key file.", + "host_not_reachable": "[E006] Host is not reachable.", + "connection_timed_out": "[E007] Connection to the host timed out.", + "docker_service_not_found": "[E008] The service name was not found on the remote host. Check the name and make sure the container exists." }, "abort": { "service_not_found": "The service ssh_command.execute was not found. Please install SSH Command through HACS and add it as an integration.", @@ -85,13 +86,14 @@ } }, "error": { - "password_or_key_file_required": "Either password or key file must be provided.", - "cannot_connect": "Cannot connect to the remote host.", - "docker_command_failed": "The docker command failed. Check the docker command and permissions.", - "host_key_not_verifiable": "The host key could not be verified.", - "login_failed": "SSH login failed. Check username and password/key file.", - "host_not_reachable": "Host is not reachable.", - "connection_timed_out": "Connection to the host timed out." + "password_or_key_file_required": "[E001] Either password or key file must be provided.", + "cannot_connect": "[E002] Cannot connect to the remote host.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "host_key_not_verifiable": "[E004] The host key could not be verified.", + "login_failed": "[E005] SSH login failed. Check username and password/key file.", + "host_not_reachable": "[E006] Host is not reachable.", + "connection_timed_out": "[E007] Connection to the host timed out." } }, "services": { diff --git a/translations/de.json b/translations/de.json index 9667dbf..4fee4bb 100644 --- a/translations/de.json +++ b/translations/de.json @@ -37,14 +37,15 @@ } }, "error": { - "password_or_key_file_required": "Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", - "cannot_connect": "Es kann keine Verbindung zum entfernten Host hergestellt werden.", - "docker_command_failed": "Der Docker-Befehl ist fehlgeschlagen. Überprüfen Sie den Docker-Befehl und die Berechtigungen.", - "host_key_not_verifiable": "Der Host-Schlüssel konnte nicht verifiziert werden.", - "login_failed": "SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", - "host_not_reachable": "Host ist nicht erreichbar.", - "connection_timed_out": "Die Verbindung zum Host hat das Zeitlimit überschritten.", - "docker_service_not_found": "Der Dienstname wurde auf dem entfernten Host nicht gefunden. Überprüfen Sie den Namen und stellen Sie sicher, dass der Container existiert." + "password_or_key_file_required": "[E001] Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", + "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", + "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist und der Benutzer ihn ausführen darf.", + "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", + "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", + "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", + "host_not_reachable": "[E006] Host ist nicht erreichbar.", + "connection_timed_out": "[E007] Die Verbindung zum Host hat das Zeitlimit überschritten.", + "docker_service_not_found": "[E008] Der Dienstname wurde auf dem entfernten Host nicht gefunden. Überprüfen Sie den Namen und stellen Sie sicher, dass der Container existiert." }, "abort": { "service_not_found": "Der Service ssh_command.execute wurde nicht gefunden. Bitte installiere SSH Command in HACS und füge die Integration hinzu.", @@ -85,13 +86,14 @@ } }, "error": { - "password_or_key_file_required": "Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", - "cannot_connect": "Es kann keine Verbindung zum entfernten Host hergestellt werden.", - "docker_command_failed": "Der Docker-Befehl ist fehlgeschlagen. Überprüfen Sie den Docker-Befehl und die Berechtigungen.", - "host_key_not_verifiable": "Der Host-Schlüssel konnte nicht verifiziert werden.", - "login_failed": "SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", - "host_not_reachable": "Host ist nicht erreichbar.", - "connection_timed_out": "Die Verbindung zum Host hat das Zeitlimit überschritten." + "password_or_key_file_required": "[E001] Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", + "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", + "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist und der Benutzer ihn ausführen darf.", + "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", + "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", + "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", + "host_not_reachable": "[E006] Host ist nicht erreichbar.", + "connection_timed_out": "[E007] Die Verbindung zum Host hat das Zeitlimit überschritten." } }, "services": { diff --git a/translations/en.json b/translations/en.json index c294aef..6de4982 100644 --- a/translations/en.json +++ b/translations/en.json @@ -37,14 +37,15 @@ } }, "error": { - "password_or_key_file_required": "Either password or key file must be provided.", - "cannot_connect": "Cannot connect to the remote host.", - "docker_command_failed": "The docker command failed. Check the docker command and permissions.", - "host_key_not_verifiable": "The host key could not be verified.", - "login_failed": "SSH login failed. Check username and password/key file.", - "host_not_reachable": "Host is not reachable.", - "connection_timed_out": "Connection to the host timed out.", - "docker_service_not_found": "The service name was not found on the remote host. Check the name and make sure the container exists." + "password_or_key_file_required": "[E001] Either password or key file must be provided.", + "cannot_connect": "[E002] Cannot connect to the remote host.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "host_key_not_verifiable": "[E004] The host key could not be verified.", + "login_failed": "[E005] SSH login failed. Check username and password/key file.", + "host_not_reachable": "[E006] Host is not reachable.", + "connection_timed_out": "[E007] Connection to the host timed out.", + "docker_service_not_found": "[E008] The service name was not found on the remote host. Check the name and make sure the container exists." }, "abort": { "service_not_found": "The service ssh_command.execute was not found. Please install SSH Command through HACS and add it as an integration.", @@ -85,13 +86,14 @@ } }, "error": { - "password_or_key_file_required": "Either password or key file must be provided.", - "cannot_connect": "Cannot connect to the remote host.", - "docker_command_failed": "The docker command failed. Check the docker command and permissions.", - "host_key_not_verifiable": "The host key could not be verified.", - "login_failed": "SSH login failed. Check username and password/key file.", - "host_not_reachable": "Host is not reachable.", - "connection_timed_out": "Connection to the host timed out." + "password_or_key_file_required": "[E001] Either password or key file must be provided.", + "cannot_connect": "[E002] Cannot connect to the remote host.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "host_key_not_verifiable": "[E004] The host key could not be verified.", + "login_failed": "[E005] SSH login failed. Check username and password/key file.", + "host_not_reachable": "[E006] Host is not reachable.", + "connection_timed_out": "[E007] Connection to the host timed out." } }, "services": { From 71e71146770d23cc7ac5d13ecda59212d1c5777a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:15:15 +0000 Subject: [PATCH 3/9] Apply remaining changes Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- options_flow.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/options_flow.py b/options_flow.py index 1d5613b..5d2d1d2 100644 --- a/options_flow.py +++ b/options_flow.py @@ -16,7 +16,7 @@ CONF_DOCKER_COMMAND, CONF_AUTO_UPDATE, CONF_CHECK_FOR_UPDATES, DEFAULT_DOCKER_COMMAND, DEFAULT_PORT, DEFAULT_PASSPHRASE, DEFAULT_CHECK_KNOWN_HOSTS, DEFAULT_AUTO_UPDATE, DEFAULT_CHECK_FOR_UPDATES, DEFAULT_TIMEOUT, - SSH_COMMAND_DOMAIN, SSH_COMMAND_SERVICE_EXECUTE, SSH_CONF_EXIT_STATUS, + SSH_COMMAND_DOMAIN, SSH_COMMAND_SERVICE_EXECUTE, SSH_CONF_EXIT_STATUS, SSH_CONF_OUTPUT, SSH_CONF_ERROR, ) _LOGGER = logging.getLogger(__name__) @@ -75,7 +75,10 @@ async def validate_and_build_options( user_input[CONF_HOST], exit_status, ) - if exit_status == 127: + messages = " ".join( + str(response.get(key) or "") for key in (SSH_CONF_OUTPUT, SSH_CONF_ERROR) + ).lower() if response else "" + if exit_status == 127 or "not found" in messages: return {}, "docker_command_not_found" return {}, "docker_command_failed" except ServiceValidationError as exc: From b60259fe9f72b66bfc718568a9efdfbd2076e03c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:18:40 +0000 Subject: [PATCH 4/9] Apply remaining changes Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- README.md | 2 +- options_flow.py | 7 ++----- strings.json | 4 ++-- translations/de.json | 4 ++-- translations/en.json | 4 ++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b7b9cb1..7a47dec 100644 --- a/README.md +++ b/README.md @@ -393,7 +393,7 @@ Errors shown while adding or reconfiguring a container are prefixed with a code. |------|---------|------------| | E001 | Neither password nor key file was provided. | Provide one of them. | | E002 | Cannot connect to the remote host. | Check host, port and network. | -| E003 | The docker command exited with an error. | Check the docker command and that the user may run it (e.g. `sudo` or docker group). | +| E003 | The docker command exited with an error. This also happens if the executable was not found when the command is prefixed (e.g. `sudo docker`). | Check the docker command, that the executable exists on the host (use its absolute path, e.g. `sudo /usr/bin/docker`), and that the user may run it (e.g. `sudo` or docker group). | | E004 | The host key could not be verified. | Check the known hosts file or disable the known hosts check. | | E005 | SSH login failed. | Check username and password/key file. | | E006 | Host is not reachable. | Check the host address and network. | diff --git a/options_flow.py b/options_flow.py index 5d2d1d2..1d5613b 100644 --- a/options_flow.py +++ b/options_flow.py @@ -16,7 +16,7 @@ CONF_DOCKER_COMMAND, CONF_AUTO_UPDATE, CONF_CHECK_FOR_UPDATES, DEFAULT_DOCKER_COMMAND, DEFAULT_PORT, DEFAULT_PASSPHRASE, DEFAULT_CHECK_KNOWN_HOSTS, DEFAULT_AUTO_UPDATE, DEFAULT_CHECK_FOR_UPDATES, DEFAULT_TIMEOUT, - SSH_COMMAND_DOMAIN, SSH_COMMAND_SERVICE_EXECUTE, SSH_CONF_EXIT_STATUS, SSH_CONF_OUTPUT, SSH_CONF_ERROR, + SSH_COMMAND_DOMAIN, SSH_COMMAND_SERVICE_EXECUTE, SSH_CONF_EXIT_STATUS, ) _LOGGER = logging.getLogger(__name__) @@ -75,10 +75,7 @@ async def validate_and_build_options( user_input[CONF_HOST], exit_status, ) - messages = " ".join( - str(response.get(key) or "") for key in (SSH_CONF_OUTPUT, SSH_CONF_ERROR) - ).lower() if response else "" - if exit_status == 127 or "not found" in messages: + if exit_status == 127: return {}, "docker_command_not_found" return {}, "docker_command_failed" except ServiceValidationError as exc: diff --git a/strings.json b/strings.json index 6de4982..8e75be0 100644 --- a/strings.json +++ b/strings.json @@ -39,7 +39,7 @@ "error": { "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", - "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", @@ -88,7 +88,7 @@ "error": { "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", - "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", diff --git a/translations/de.json b/translations/de.json index 4fee4bb..daf9bb8 100644 --- a/translations/de.json +++ b/translations/de.json @@ -39,7 +39,7 @@ "error": { "password_or_key_file_required": "[E001] Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", - "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist und der Benutzer ihn ausführen darf.", + "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist, die ausführbare Datei auf dem entfernten Host existiert (verwenden Sie insbesondere mit `sudo` den absoluten Pfad) und der Benutzer sie ausführen darf.", "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", @@ -88,7 +88,7 @@ "error": { "password_or_key_file_required": "[E001] Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", - "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist und der Benutzer ihn ausführen darf.", + "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist, die ausführbare Datei auf dem entfernten Host existiert (verwenden Sie insbesondere mit `sudo` den absoluten Pfad) und der Benutzer sie ausführen darf.", "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", diff --git a/translations/en.json b/translations/en.json index 6de4982..8e75be0 100644 --- a/translations/en.json +++ b/translations/en.json @@ -39,7 +39,7 @@ "error": { "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", - "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", @@ -88,7 +88,7 @@ "error": { "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", - "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct and that the user has permission to run it.", + "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", From f8a56eb005bff671d60f8175403632308a2cc372 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Oct 2026 12:09:55 +0000 Subject: [PATCH 5/9] Apply remaining changes Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- README.md | 1 + options_flow.py | 9 +++++++++ strings.json | 2 ++ translations/de.json | 2 ++ translations/en.json | 2 ++ 5 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 7a47dec..fd9446c 100644 --- a/README.md +++ b/README.md @@ -400,6 +400,7 @@ Errors shown while adding or reconfiguring a container are prefixed with a code. | E007 | The connection timed out. | Check that the host is online and the port is correct. | | E008 | The container name was not found on the host. | Check the name with `docker ps -a` on the host. | | E009 | The docker executable was not found (exit status 127). | Non-interactive SSH sessions may not have `docker` on the `PATH` (common on QNAP/Synology NAS). Enter the absolute path as Docker Command (e.g. `/usr/bin/docker`) or symlink it into `/usr/bin`. | +| E010 | The known hosts file was not found (SSH check enabled). | Provide the path to an existing known hosts file, create the default `~/.ssh/known_hosts` of the user running Home Assistant, or disable *Check Known Hosts*. | ## ⚠️ Known Issues diff --git a/options_flow.py b/options_flow.py index 1d5613b..c00f92d 100644 --- a/options_flow.py +++ b/options_flow.py @@ -93,6 +93,15 @@ async def validate_and_build_options( exc, ) return {}, "cannot_connect" + except FileNotFoundError as exc: + _LOGGER.warning( + "SSH validation for host %s raised FileNotFoundError: %s", + user_input[CONF_HOST], + exc, + ) + if "known_hosts" in str(exc.filename or ""): + return {}, "known_hosts_not_found" + return {}, "cannot_connect" except Exception as exc: # pylint: disable=broad-except _LOGGER.warning( "SSH validation for host %s raised an unexpected exception: %s", diff --git a/strings.json b/strings.json index 8e75be0..b3c9e8b 100644 --- a/strings.json +++ b/strings.json @@ -41,6 +41,7 @@ "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", @@ -90,6 +91,7 @@ "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", diff --git a/translations/de.json b/translations/de.json index daf9bb8..96a6295 100644 --- a/translations/de.json +++ b/translations/de.json @@ -41,6 +41,7 @@ "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist, die ausführbare Datei auf dem entfernten Host existiert (verwenden Sie insbesondere mit `sudo` den absoluten Pfad) und der Benutzer sie ausführen darf.", "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", + "known_hosts_not_found": "[E010] Die known_hosts-Datei wurde nicht gefunden. Geben Sie den Pfad zu einer vorhandenen known_hosts-Datei an, legen Sie die Standarddatei (~/.ssh/known_hosts) auf dem Home-Assistant-Rechner an oder deaktivieren Sie 'Bekannte Hosts prüfen'.", "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", "host_not_reachable": "[E006] Host ist nicht erreichbar.", @@ -90,6 +91,7 @@ "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist, die ausführbare Datei auf dem entfernten Host existiert (verwenden Sie insbesondere mit `sudo` den absoluten Pfad) und der Benutzer sie ausführen darf.", "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", + "known_hosts_not_found": "[E010] Die known_hosts-Datei wurde nicht gefunden. Geben Sie den Pfad zu einer vorhandenen known_hosts-Datei an, legen Sie die Standarddatei (~/.ssh/known_hosts) auf dem Home-Assistant-Rechner an oder deaktivieren Sie 'Bekannte Hosts prüfen'.", "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", "host_not_reachable": "[E006] Host ist nicht erreichbar.", diff --git a/translations/en.json b/translations/en.json index 8e75be0..b3c9e8b 100644 --- a/translations/en.json +++ b/translations/en.json @@ -41,6 +41,7 @@ "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", @@ -90,6 +91,7 @@ "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", From c760336b89aa9be1f8cc462fe1400a69d045f8f1 Mon Sep 17 00:00:00 2001 From: gensyn Date: Fri, 23 Oct 2026 14:18:13 +0200 Subject: [PATCH 6/9] Fixed README.md --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fd9446c..d59ce8d 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ When **Check for updates** is enabled for a container entry, SSH Docker also cre Navigate to **Settings → Updates** in Home Assistant. Containers with a pending image update are listed there. Click the container's update card and then **Install** to trigger a container recreation using the `docker_create` executable on the remote host — exactly the same operation as clicking **⬆ Update** in the sidebar panel. -> **Requires** the `docker_create` executable to be present on the remote host. See [Custom Executables](#%EF%B8%8F-custom-executables) for details. +> **Requires** the `docker_create` executable to be present on the remote host. See [Custom Executables](#-custom-executables) for details. While the installation is running the entity reports `in_progress: true` and the update card shows a progress indicator. Once completed the sensor is refreshed automatically to reflect the new container state. @@ -389,18 +389,18 @@ Community contributions for additional languages are welcome! Errors shown while adding or reconfiguring a container are prefixed with a code. -| Code | Meaning | What to do | -|------|---------|------------| -| E001 | Neither password nor key file was provided. | Provide one of them. | -| E002 | Cannot connect to the remote host. | Check host, port and network. | -| E003 | The docker command exited with an error. This also happens if the executable was not found when the command is prefixed (e.g. `sudo docker`). | Check the docker command, that the executable exists on the host (use its absolute path, e.g. `sudo /usr/bin/docker`), and that the user may run it (e.g. `sudo` or docker group). | -| E004 | The host key could not be verified. | Check the known hosts file or disable the known hosts check. | -| E005 | SSH login failed. | Check username and password/key file. | -| E006 | Host is not reachable. | Check the host address and network. | -| E007 | The connection timed out. | Check that the host is online and the port is correct. | -| E008 | The container name was not found on the host. | Check the name with `docker ps -a` on the host. | -| E009 | The docker executable was not found (exit status 127). | Non-interactive SSH sessions may not have `docker` on the `PATH` (common on QNAP/Synology NAS). Enter the absolute path as Docker Command (e.g. `/usr/bin/docker`) or symlink it into `/usr/bin`. | -| E010 | The known hosts file was not found (SSH check enabled). | Provide the path to an existing known hosts file, create the default `~/.ssh/known_hosts` of the user running Home Assistant, or disable *Check Known Hosts*. | +| Code | Meaning | What to do | +|------|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| E001 | Neither password nor key file was provided. | Provide one of them. | +| E002 | Cannot connect to the remote host. | Check host, port and network. | +| E003 | The docker command exited with an error. This also happens if the executable was not found when the command is prefixed (e.g. `sudo docker`). | Check the docker command, that the executable exists on the host (use its absolute path, e.g. `sudo /usr/bin/docker`), and that the user may run it (e.g. `sudo` or docker group). | +| E004 | The host key could not be verified. | Check the known hosts file or disable the known hosts check. | +| E005 | SSH login failed. | Check username and password/key file. | +| E006 | Host is not reachable. | Check the host address and network. | +| E007 | The connection timed out. | Check that the host is online and the port is correct. | +| E008 | The container name was not found on the host. | Check the name with `docker ps -a` on the host. | +| E009 | The docker executable was not found (exit status 127). | Non-interactive SSH sessions may not have `docker` on the `PATH` (common on QNAP/Synology NAS). Enter the absolute path as Docker Command (e.g. `/usr/bin/docker`) or symlink it into `/usr/bin`. | +| E010 | The known hosts file was not found (SSH check enabled). | Provide the path to an existing known hosts file, create the default `~/.ssh/known_hosts` of the user running Home Assistant, or disable *Check Known Hosts*. | ## ⚠️ Known Issues From b417e6422ca480cecb9875d5f29681b8ddee7573 Mon Sep 17 00:00:00 2001 From: gensyn <36128035+gensyn@users.noreply.github.com> Date: Fri, 23 Oct 2026 14:26:21 +0200 Subject: [PATCH 7/9] Add known_hosts check for connection errors Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- options_flow.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/options_flow.py b/options_flow.py index c00f92d..a4929c4 100644 --- a/options_flow.py +++ b/options_flow.py @@ -99,7 +99,15 @@ async def validate_and_build_options( user_input[CONF_HOST], exc, ) - if "known_hosts" in str(exc.filename or ""): + from pathlib import Path + + known_hosts = user_input.get(CONF_KNOWN_HOSTS) or "~/.ssh/known_hosts" + if ( + user_input.get(CONF_CHECK_KNOWN_HOSTS, DEFAULT_CHECK_KNOWN_HOSTS) + and exc.filename is not None + and Path(exc.filename).expanduser().absolute() + == Path(known_hosts).expanduser().absolute() + ): return {}, "known_hosts_not_found" return {}, "cannot_connect" except Exception as exc: # pylint: disable=broad-except From 61a508be16922c49f2cb077c07244e28eb94bf8b Mon Sep 17 00:00:00 2001 From: gensyn Date: Fri, 23 Oct 2026 14:36:44 +0200 Subject: [PATCH 8/9] Added strings for error "known_hosts_with_check_disabled" --- strings.json | 14 ++++++++------ translations/de.json | 14 ++++++++------ translations/en.json | 14 ++++++++------ 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/strings.json b/strings.json index b3c9e8b..927ec60 100644 --- a/strings.json +++ b/strings.json @@ -40,13 +40,14 @@ "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", - "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", - "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", "connection_timed_out": "[E007] Connection to the host timed out.", - "docker_service_not_found": "[E008] The service name was not found on the remote host. Check the name and make sure the container exists." + "docker_service_not_found": "[E008] The service name was not found on the remote host. Check the name and make sure the container exists.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", + "known_hosts_with_check_disabled": "[E011] The known hosts file was provided but 'Check Known Hosts' is disabled. Either enable 'Check Known Hosts' or remove the known hosts file path." }, "abort": { "service_not_found": "The service ssh_command.execute was not found. Please install SSH Command through HACS and add it as an integration.", @@ -90,12 +91,13 @@ "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", - "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", - "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", - "connection_timed_out": "[E007] Connection to the host timed out." + "connection_timed_out": "[E007] Connection to the host timed out.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", + "known_hosts_with_check_disabled": "[E011] The known hosts file was provided but 'Check Known Hosts' is disabled. Either enable 'Check Known Hosts' or remove the known hosts file path." } }, "services": { diff --git a/translations/de.json b/translations/de.json index 96a6295..413f478 100644 --- a/translations/de.json +++ b/translations/de.json @@ -40,13 +40,14 @@ "password_or_key_file_required": "[E001] Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist, die ausführbare Datei auf dem entfernten Host existiert (verwenden Sie insbesondere mit `sudo` den absoluten Pfad) und der Benutzer sie ausführen darf.", - "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", - "known_hosts_not_found": "[E010] Die known_hosts-Datei wurde nicht gefunden. Geben Sie den Pfad zu einer vorhandenen known_hosts-Datei an, legen Sie die Standarddatei (~/.ssh/known_hosts) auf dem Home-Assistant-Rechner an oder deaktivieren Sie 'Bekannte Hosts prüfen'.", "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", "host_not_reachable": "[E006] Host ist nicht erreichbar.", "connection_timed_out": "[E007] Die Verbindung zum Host hat das Zeitlimit überschritten.", - "docker_service_not_found": "[E008] Der Dienstname wurde auf dem entfernten Host nicht gefunden. Überprüfen Sie den Namen und stellen Sie sicher, dass der Container existiert." + "docker_service_not_found": "[E008] Der Dienstname wurde auf dem entfernten Host nicht gefunden. Überprüfen Sie den Namen und stellen Sie sicher, dass der Container existiert.", + "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", + "known_hosts_not_found": "[E010] Die known_hosts-Datei wurde nicht gefunden. Geben Sie den Pfad zu einer vorhandenen known_hosts-Datei an, legen Sie die Standarddatei (~/.ssh/known_hosts) auf dem Home-Assistant-Rechner an oder deaktivieren Sie 'Bekannte Hosts prüfen'.", + "known_hosts_with_check_disabled": "[E011] Die known_hosts-Datei wurde angegeben, aber die Option 'Bekannte Hosts prüfen' ist deaktiviert. Entweder aktivieren Sie die Option oder entfernen Sie den Pfad zur known_hosts-Datei." }, "abort": { "service_not_found": "Der Service ssh_command.execute wurde nicht gefunden. Bitte installiere SSH Command in HACS und füge die Integration hinzu.", @@ -90,12 +91,13 @@ "password_or_key_file_required": "[E001] Es muss entweder ein Passwort oder eine Schlüsseldatei angegeben werden.", "cannot_connect": "[E002] Es kann keine Verbindung zum entfernten Host hergestellt werden.", "docker_command_failed": "[E003] Der Docker-Befehl ist fehlgeschlagen. Prüfen Sie, ob der Docker-Befehl korrekt ist, die ausführbare Datei auf dem entfernten Host existiert (verwenden Sie insbesondere mit `sudo` den absoluten Pfad) und der Benutzer sie ausführen darf.", - "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", - "known_hosts_not_found": "[E010] Die known_hosts-Datei wurde nicht gefunden. Geben Sie den Pfad zu einer vorhandenen known_hosts-Datei an, legen Sie die Standarddatei (~/.ssh/known_hosts) auf dem Home-Assistant-Rechner an oder deaktivieren Sie 'Bekannte Hosts prüfen'.", "host_key_not_verifiable": "[E004] Der Host-Schlüssel konnte nicht verifiziert werden.", "login_failed": "[E005] SSH-Anmeldung fehlgeschlagen. Überprüfen Sie Benutzername und Passwort/Schlüsseldatei.", "host_not_reachable": "[E006] Host ist nicht erreichbar.", - "connection_timed_out": "[E007] Die Verbindung zum Host hat das Zeitlimit überschritten." + "connection_timed_out": "[E007] Die Verbindung zum Host hat das Zeitlimit überschritten.", + "docker_command_not_found": "[E009] Die ausführbare Docker-Datei wurde auf dem entfernten Host nicht gefunden. Verwenden Sie den absoluten Pfad zur Datei (z. B. /usr/bin/docker) oder fügen Sie sie dem PATH nicht-interaktiver SSH-Sitzungen hinzu.", + "known_hosts_not_found": "[E010] Die known_hosts-Datei wurde nicht gefunden. Geben Sie den Pfad zu einer vorhandenen known_hosts-Datei an, legen Sie die Standarddatei (~/.ssh/known_hosts) auf dem Home-Assistant-Rechner an oder deaktivieren Sie 'Bekannte Hosts prüfen'.", + "known_hosts_with_check_disabled": "[E011] Die known_hosts-Datei wurde angegeben, aber die Option 'Bekannte Hosts prüfen' ist deaktiviert. Entweder aktivieren Sie die Option oder entfernen Sie den Pfad zur known_hosts-Datei." } }, "services": { diff --git a/translations/en.json b/translations/en.json index b3c9e8b..927ec60 100644 --- a/translations/en.json +++ b/translations/en.json @@ -40,13 +40,14 @@ "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", - "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", - "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", "connection_timed_out": "[E007] Connection to the host timed out.", - "docker_service_not_found": "[E008] The service name was not found on the remote host. Check the name and make sure the container exists." + "docker_service_not_found": "[E008] The service name was not found on the remote host. Check the name and make sure the container exists.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", + "known_hosts_with_check_disabled": "[E011] The known hosts file was provided but 'Check Known Hosts' is disabled. Either enable 'Check Known Hosts' or remove the known hosts file path." }, "abort": { "service_not_found": "The service ssh_command.execute was not found. Please install SSH Command through HACS and add it as an integration.", @@ -90,12 +91,13 @@ "password_or_key_file_required": "[E001] Either password or key file must be provided.", "cannot_connect": "[E002] Cannot connect to the remote host.", "docker_command_failed": "[E003] The docker command failed. Check that the docker command is correct, that the executable exists on the remote host (use its absolute path, especially with `sudo`), and that the user has permission to run it.", - "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", - "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", "host_key_not_verifiable": "[E004] The host key could not be verified.", "login_failed": "[E005] SSH login failed. Check username and password/key file.", "host_not_reachable": "[E006] Host is not reachable.", - "connection_timed_out": "[E007] Connection to the host timed out." + "connection_timed_out": "[E007] Connection to the host timed out.", + "docker_command_not_found": "[E009] The docker executable was not found on the remote host. Use the absolute path to the executable (e.g. /usr/bin/docker) or add it to the PATH of non-interactive SSH sessions.", + "known_hosts_not_found": "[E010] The known hosts file was not found. Provide the path to an existing known hosts file, create the default one (~/.ssh/known_hosts) on the Home Assistant machine, or disable 'Check Known Hosts'.", + "known_hosts_with_check_disabled": "[E011] The known hosts file was provided but 'Check Known Hosts' is disabled. Either enable 'Check Known Hosts' or remove the known hosts file path." } }, "services": { From a8af8c1c64ee6ff9429d45a656b57d187dd67f08 Mon Sep 17 00:00:00 2001 From: gensyn Date: Fri, 23 Oct 2026 14:38:24 +0200 Subject: [PATCH 9/9] Added strings for error "known_hosts_with_check_disabled" --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d59ce8d..7291803 100644 --- a/README.md +++ b/README.md @@ -401,6 +401,7 @@ Errors shown while adding or reconfiguring a container are prefixed with a code. | E008 | The container name was not found on the host. | Check the name with `docker ps -a` on the host. | | E009 | The docker executable was not found (exit status 127). | Non-interactive SSH sessions may not have `docker` on the `PATH` (common on QNAP/Synology NAS). Enter the absolute path as Docker Command (e.g. `/usr/bin/docker`) or symlink it into `/usr/bin`. | | E010 | The known hosts file was not found (SSH check enabled). | Provide the path to an existing known hosts file, create the default `~/.ssh/known_hosts` of the user running Home Assistant, or disable *Check Known Hosts*. | +| E011 | The known hosts file was provided but 'Check Known Hosts' is disabled. | Either enable 'Check Known Hosts' or remove the known hosts file path. | ## ⚠️ Known Issues