- Platform information:
- openHAB Host OS: Ubuntu 24.04 LTS
- Remote Host OS: macos
- Issue of the topic:
I want to ssh directly into a Karaf console of my openHAB inside a docker container with a single command. On my mac I’m using a tool to open ssh consoles to different machines. I would be happy to integrate openhab. It requires a single command/line to open the ssh connection and to enter the docker container.
I can ssh onto my openhab host:
ssh username@openhabIP -i ~/path/to/key
On my openhab system I can successfully enter the openhab console by following command:
username@openhab:~$ docker exec -it openhab /openhab/runtime/bin/client
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/openhab/runtime/system/org/apache/karaf/org.apache.karaf.client/4.4.6/org.apache.karaf.client-4.4.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
Logging in as openhab
Password:
_ _ _ ____
___ ___ ___ ___ | | | | / \ | __ )
/ _ \ / _ \ / _ \ / _ \ | |_| | / _ \ | _ \
| (_) | (_) | __/| | | || _ | / ___ \ | |_) )
\___/| __/ \___/|_| |_||_| |_|/_/ \_\|____/
|_| 4.2.0 - Release Build
Use '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
To exit, use '<ctrl-d>' or 'logout'.
The combination does not work:
ssh username@openhabIP -i ~/path/to/key "docker exec -it openhab /openhab/runtime/bin/client"
the input device is not a TTY
neither does:
ssh username@openhabIP -i ~/path/to/key "docker exec -i openhab /openhab/runtime/bin/client"
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/openhab/runtime/system/org/apache/karaf/org.apache.karaf.client/4.4.6/org.apache.karaf.client-4.4.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
No more authentication methods available
Is there a way to combine it?
Thank you!