openHABian hassle-free openHAB Setup

Even after a reboot? @UglyKidJoe what’s up with your setup? :slight_smile:

Yes, even after a reboot.

Did a fresh install today, but removed the snapshot and installed RC1. I cannot log into Karaf - “habopen” seems to be wrong. Can I change the password?

Are you sure you gave karaf enough time to generate it’s host key? That’s a nuisance that will soon be in the past:

Yes I think so …

[20:35:46] pi@openHABianPi:~$ rm /home/pi/.ssh/known_hosts
[20:36:03] pi@openHABianPi:~$ ssh openhab@localhost -p 8101
The authenticity of host ‘[localhost]:8101 ([]:8101)’ can’t be established.
DSA key fingerprint is ab:cd:keyxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[localhost]:8101’ (DSA) to the list of known hosts.
Password authentication
Password authentication

Oh okay…

(side note, do not use the first command. It’s probably not wrong here and now)

You will find a function to change the password for the karaf console through sudo openhabian-config


Unfortunately, I can only find the option (06) to bind Karaf to all interfaces. Which setting is it that you are referring to?

Thanks in advance.

It’s the one. I’ve just combined both actions as one (binding, changing password), could have made that clearer.
If you do not want to bind to all interfaces (in a local subnet will probably not hurt): Here you can find the command you’ll need to execute.

1 Like

Sorry if this isn’t the right place.

I’m trying to install Habmin2. The only tutorial I’ve found hasn’t been updated last august and the instructions seem out of date. They reference a .jar file, but all I’m able to find on the Habmin github page is a tar file with a bunch of installation files.

Can someone forward me to an updated set of instructions, or is there a better way to install habmin2 on openhabian?


Worked well - thanks a lot.

I am still seeing this in the logs after OH2 startup:

21:58:35.370 [WARN ] [vider.SimpleGeneratorHostKeyProvider] - Unable to read key /var/lib/openhab2/etc/host.key:
21:58:35.423 [ERROR] [vider.SimpleGeneratorHostKeyProvider] - Overwriting key (host.key) is disabled: using throwaway

You don’t have to handle jar files to install habmin. You can easily install it through

I suspected as much, but I don’t see Habadmin listed in the Addons page. Is it labeled as something else?

Edit: Nevermind. I’m just apparently blind. Thanks. :slight_smile:

The good news is that I got my Pi connected on WiFi. It’s been running with no issues at all and I love OpenHAB once again :slight_smile:

The downside is that I haven’t discovered the root cause. The only thing a did differently was to run across the hall to disconnect the ethernet cable the moment I issued the shudown command. In other words it connected fine to WiFi only on reboot without ethernet. I’m not sure if that was intended all along?

These are the exacts things I did:

  1. Wrote image openhabian-ua-netinst-20161216-git52cc420 to SD card
  2. Powered up, waited 45 mins + 15 to initialise itself - OK
  3. Checked OpenHAB connected(ethernet) - OK
  4. Checked samba connection to OPENHABIAN - OK
  5. Connected SSH to the Pi on OPENHABIAN port 8080 - OK
  6. Ran menu option 1. Update
  7. Ran menu option 2. Basic Setup
  8. Changed password
  9. Changed time zone
  10. Added WiFi credentials via menu option
  11. Rebooted without ethernet
  12. Voila!

If anything I hope that helps anyone who encounters the same thing.

A package has arrived. Spoiler Time! Thanks @Kai


Dear Thom,

after the update last week my openhab continues to lead the next build;

openHAB 2.0.0~20170108170225-1 (Build #733)

Is there a way to fix this?

I’m having the same hosts.key issue as @philKrylc
My system was working fine using an install from late December, but I decided to do a clean install with the new packages. Now I periodically see this in the log:

10:40:34.952 [WARN ] [.ssh.OpenSSHGeneratorFileKeyProvider] - Unable to read key /var/lib/openhab2/etc/host.key: org.apache.commons.ssl.ProbablyNotPKCS8Exception: asn1 parse failure: java.lang.IllegalArgumentException: DEREncodable must be one of: DERSequence, DERSet, DERTaggedObject
10:40:34.995 [ERROR] [.ssh.OpenSSHGeneratorFileKeyProvider] - Overwriting key (host.key) is disabled: using throwaway

How do I fix this problem?


That is interesting. There has been a change related to hosts.key (by me), so let’s hope this is not a bigger issue.

@philKrylc @Noircogi Could you please test two things for me:

  • Log in to the Karaf remote console (Beware that you may need a few minutes on first try as the RPi needs some time) After you were successfully logged in check the logs again.

  • Delete hosts.key sudo rm /var/lib/openhab2/etc/host.key and restart openhab2. Does the error still show?

What do you mean? The “-1”?

I had previously tried deleting host.key, but just did it again as a test. On the first reboot after doing that, there is the long pause when trying to start karafshell. In fact this time, it went so long that it timed out and reported a connection failure. I tried to connect again and it worked.

On the first start-up after deleting host.key, you just see the warning message above, without the error. The host.key file is re-generated, but with zero length, just like every time with the new install.

On the second start after deleting, you see both the warning and the error in the log.

One other key difference I’ve noticed.

In the past, when starting the built-in “karafshell” shortcut, it would be prompted for my sudo password, but not for the openhab password. With the new install, I’m prompted for the sudo password, then also the openhab password.

I have no idea what it means. I copied from Putty.

Yesterday the update remained suspended and I have fixed this with.

sudo apt install openhab2-addons openhab2-addons-legacy

Okay, for your information: The reason for the change you seem to have trouble with is that I want to eliminate this:

You can find all the details here:

Seems like the error you are seeing has something to do with internal key generation. Would you please try to generate it yourself? This is what actually is planned to be done in the future while package installation.

rm /var/lib/openhab2/etc/host.key
openssl genrsa -out /var/lib/openhab2/etc/host.key 4096
systemctl restart openhab2.service

Is the error still present? (I’m using such a key myself and do not see your error)

Wow, somebody is using this alias :smiley: I’ve only mentioned it once or twice :slight_smile: It is defined here and is with it’s internal use of “sudo” actually something I wanted to do exchange. Sooo, asking fo the sudo password is to be expected. The fact that client is now also asking for the password might be something that the change introduced. We might need to look into that. It’s not critical though.

I will create a ticket for all of this as soon as the problem and a solution are found. Prematurely mentioning @Kai and @Benjy here…

1 Like