I’ve installed openHAB 3 on my PocketBeagle a couple of days ago. The PocketBeagle runs on Debian 10, so I installed OH according to this guide. I think OH is running successfully so far, but I can’t connect to the console.
I tried accessing it via SSH like described here. Therefore, I changed the sshHost in the runtime.cfg file to 0.0.0.0 (Do I even need to do that?) and I opened ports 8101 for the SSH connection and 443 for https traffic like mentioned in this post. If I want to connect to the OH console from my PC to OH on the PocketBeagle with the command ssh -p 8101 openhab@192.168.2.125 (192.168.2.125 is the IP of the PocketBeagle) I get this result:
For the password, I entered “habopen” because the default username/password is openhab:habopen.
I also read in this thread that I could use the command openhab-cli console when connected to the PocketBeagle with my normal account that has sudo rights. I then get this:
raphael@beaglebone:~$ sudo openhab-cli console
Logging in as openhab
Password:
Password:
No more authentication methods available
I am new to Linux, so I might have missed something. If so, please tell me. Thanks in advance for any help.
in this example port 8101 is listening on the ehternet interface not just on localhost as the default is.
all listening ports for java ( openhab ) are shown
@denominator I get the same results as when I try to ssh from my PC to openhab. It asks me six times to enter the password and I enter “habopen”. After that, it says “permission denied”.
Yes, the output of netstat showed that the java process is listening on port 8101 ( as well as to other ports ). As you get feedback to your ssh command as well by being logged on to your host as well as from the outside of that host also I would conclude that the karaf console replies to your trials to connect to it. In case it would only listen to localhost but not on conections to the ethernet interface you would get connection refused.
My conclusion now would be that you changed the default password.
Could that have happened ?
A crosscheck ( although I think that this is not required ) to check what is listening on port 8101 from the outside ( just in case that something on your network is rerouted ) could be that you use telnet to connect to port 8101. This then should show the banner of the service on port 8101.
At least this works for e.g. ssh service / karaf console:
telnet localhost 8101
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-SSHD-CORE-1.7.0
the last row is evidence that the karaf console is behind port 8101.
When I use the command telnet localhost 8101 and get this:
Trying ::1…
Connected to localhost.
Escape character is ‘^]’.
SSH-2.0-SSHD-CORE-1.7.0
If I understood you correctly, everything is correct because the last line is the same.
I don’t think I changed the password, but to be sure I changed it using this command: sudo sed -i -e "s/openhab = .*,/openhab = securePassword,/g" /var/lib/openhab/etc/users.properties and tried to connect after restarting, but it didn’t worked.
Thanks for your answers! I read that after changing the password, you need to restart openhab. I did so before my last answer and tried to log in, but it failed. I restarted openhab there with the command systemctl restart openhab. I restarted openhab a moment ago by stopping and starting it again. After that, I am now able to connect to the console from both my PC and the PocketBeagle. I thought that the restart command would also work.