Launch karaf console on openhab2

To see what is logged I’m doing tail -f /var/log/openhab2/openhab.log in an ssh console to my server
These days in the logging I have a lots of INFO that makes it harder to see the error and warnings.

I would like to tell karaf to log only warning and error.

Although in the config file it says that the default is warning, that is not the case (I guess because logginglevel=1 was in comment.

(config file I used was /usr/share/openhab2/runtime/karaf/etc/org.apache.karaf.shell.cfg )

it seems that the changes I make are not picked up:

I try to set sshHost = 0.0.0.0
so I can log to the karaf console from my mac where I ssh already into my raspberry PI

#
# Specify the client log level (default is WARN)

# 0: ERROR

# 1: WARN

# 2: INFO

# 3: DEBUG

# 4: TRACE

#
logLevel=1

is the other change.

Neither seem to be picked up, as I can log into karaf

not with ssh karaf@ip adres of Raspberry PI
and not with ssh openhab@ip adres of Raspberry PI

in both cases I get something like

Password authentication
Password:
Password authentication
Password:
Password authentication
Password:
openhab@192.168.1.121’s password:
Permission denied, please try again.

yes 3 demands for a password and then another demand for a password written in a different way

As I never used karaf, what I’m doing was based on http://docs.openhab.org/administration/console.html

I did restart openhab after making these changes.
when I added the local IP adres (of the machine I’m working on, I did see a message as if that machine was not reachable in the log file), hence I now used 0.0.0.0

Any idea’s?

please try

ssh karaf@ip.adress.of.RaspPI -p8101

as karaf listens at non-standard port.

As you can see, your posting is slightly deformed. please use code fences to quote code (use three backticks in a row ahead and after the code ``` )
This is especially important as the # is transformed to “Heading”, so there is no way to guess the original code…

yes that was what I did.

logging related settings are also defined in the file runtime/karaf/etc/org.ops4j.pax.logging.cfg For example the log level for bindings can be set there (similiar to the console, in fact I think the console command is getting persisted in this file).

second, please try ssh openhab@localhost -p 8101 with password habopen

2 Likes

does not work either.
Just to be sure, I’m not working locally on the raspberry (has no keyboard and screen connected)
so I’m always ssh into the raspberry.

so I assumed that doing that “ssh openhab@localhost -p 8101” with password habopen would not be possible from within one ssh session to another. Anyway, I tried and it did not work either

that was indeed better. I was able to turn of all the info’s I did not want to see (for now) and I did indeed found an error that I had not seen before.

(and that I don’t understand yet, as he’s complaining about something that does work… )
aka to be continued…

Yes, the idea is to ssh locally (even if this means to ssh inside a ssh session). For ssh from another host some settings around network security have to be applied. I am using Ubuntu so not sure if raspberry requires something different here.

Another workaround would be to start openhab with the start.sh script. This ends also in a Karaf console.

2 Likes

for me, user/password is karaf/karaf, so please try

ssh karaf@localhost -p8101

or remote

ssh karaf@ip.from.raspberry.pi -p8101

with password karaf

1 Like

with password karaf
did the trick. thank @Udo_Hartmann

1 Like

It seems like your setup is older then this post by @Kai
https://community.openhab.org/t/ssh-login-changes/12047

mm, interesting I had the impression I had the last version of openhab2.

Is there a way in the openhab “website” to see what version is running?

Are you using a"nigthly" setup? If not karaf/karaf should still be OK

When I originally installed it , I assumed I did, now I realized I did not
And I don’t know how to install them.

As I’m very new, I’m probably better of with a more stable version anyhow…

y

OSGI Access

ssh openhab@127.0.0.1 -p 8101
Passwort is “habopen”

1 Like

Hi
I have the same problem
both
ssh karaf@localhost -p 8101
with password karaf and
ssh openhab@localhost -p 8101
with password habopen
presents with returning password prompt
does not work
I can get to console via start.sh
running OH2/rpi
any ideas ?

Hi
I updated to snapshot from RC1 and on #808 the openhab/habopen works to get to console
Dont know if it was just RC1 …
anyway i am working
P

my console suddenly not able to login with below msg,

no matching cipher found: client aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se server

this is my test pi and just installed, I still able to login console yesterday and today fail,
in putty, I able to login to another pi console, just this one fail, any idea why?

Worked for me as well! I got this error then tried “ssh openhab@127.0.0.1 -p 8101”.
Received disconnect from 127.0.0.1: 2: Session has timed out waiting for authentication after 120000 ms.
[14:33:18] openhabian@openHABianPi:~$ ssh karaf@localhost -p8101

Pretty normal after first start, the host.key has to be generated on first start. Try a second or even third time and then it should work …

I wonder if openHABian should trigger the generation in the background!?

1 Like