while thinking about how to allow access to the OSGI console of my OH2 installation, I stumbled on the posting about Dropbox authentication: OSGi console Dropbox Authentication
It seems that a telnet connection to the console is (or was?) available in OH1. Is this available in OH2 as well? If not, how could I gain access to the console of OH2 running as a system service?
Does it already? I had the impression that the karaf branch is still under development / review and that the current snapshot is still based on eclipse equinox.
On the other hand, I have no real clue about OSGI, so take whatever I write with a huge block of salt.
Actually: Which port can I use to access the karaf console via ssh it is 8101, right?
I have tried to add the paramter -console 5555 to the file openhab2/runtime/karaf/karaf
But no access via telnet is possible. I wouldnāt mind as long as SSH would workā¦
Is it maybe due to the fact that I started via start.sh?
Then my shell terminated and I tried to access the still running server via a new shell
$ ssh karaf@localhost -p 8101
Password authentication
Password: <entered karaf>
-------------------------------------------------------------------------
Welcome to openHAB 2.0.0-SNAPSHOT
-------------------------------------------------------------------------
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab>
Thing is: I started a ssh shell to my raspi. There I started OH2 via the start script (and the script opens the karaf console). Then the connection was terminated and I opend a new shell.
There I tried command: ssh karaf@localhost -p 8101 -> and the connection timed out after 120s
Received disconnect from 127.0.0.1: 2: Session has timed out waiting for authentication after 120000 ms.
Nope I donāt think so. I have even tried to ssh into a running OH2 Server via a second shell. The connection times out. I have modified the startup parameter to avoid opening the local console, but no change.
Doing everything via SSH into Raspberry via Public-Key (OH2 running on that raspberry :D)
Normally running OH2 on Raspberry via service (systemctl) automatically at system startup. So when i ssh into the raspberry i donāt have any karaf console (do have if i ssh into raspberry and then start OH2 manuell via the start script. But then, if iāam killing the ssh session into raspberry, also OH2 is killed.)
If i ssh into raspberry and then using āssh karaf@localhost -p 8101ā it works.
But is there also a way directly shh into karaf from remote, without first ssh into raspberry? If iāam trying to āssh karaf@ipofraspberry -p 8101ā i get āConnection refusedā. Think that because of the public-key iāam using?
On the mac i have some alias to ssh into raspberry. Works perfectly.
alias rpi2=āssh rpi2ā
alias olog=āssh rpi2 ātail -f /opt/openhab/userdata/logs/openhab.logāā
alias elog=āssh rpi2 ātail -f /opt/openhab/userdata/logs/events.logāā
Would be nice to have a alias also for karat-console. Like (but without any password-promt).
alias karaf=āssh rpi2 āssh karaf@localhost -p 8101āā
But that didnāt worked out:
Pseudo-terminal will not be allocated because stdin is not a terminal.
Host key verification failed.