Openhab Karaf VS Extension

i have a problem with karaf and windows powershell ssh. When i connect to karaf, the console shows a clean karaf window. But when i use the command log:tail, become i bad characters as output in the console.
So what can i do ?

I use Windows 10 with Visual Studio Code and the Openhab Extension with the current versions.
Openhab is on the stable release. and runs on raspberry Pi2 with no overclocking.
Thank you!

For ssh support, i use Windows.ssh (ssh windows)


Here is a another picture

I have no idea :open_mouth:
Do you get the same jibberish when you log into the console from outside VSCode?
Maybe it’s a bug in VSCode itself or in Windows.ssh you mentioned?

The OH extension just passes commands to the integrated terminal. It has no effect on the additional stuff going on the screen.


thank your for your post.
When i use putty for the karaf connection, the output works all fine.
In powershell(ssh), i think, there is a another problem. The output comes with many returns,
Or is that correct? - In Putty shows all fine.

Maybe I should use another ssh client. But which ?
BR Cuban8

You can use the Windows WSL extension (install from the settings in Windows), and then install Ubuntu (from the Microsoft store). The bash shell from this can then replace your Powershell as terminal inside VSCode. Karaf etc all should work fine from within this shell.

thank you for your post.
I’ve installed Windwos ssh client from Windows Add/remove Features list and the Ubuntu app.
Now, when i run ssh openhab@openhab -8101 in powershell, display a unable to negotiate message. (See picture below).
How can i fix them?

Thank you very much!

You don’t need windows ssh client. You only need to install Ubuntu ( Once you have Ubuntu installed on your Windows, you can set your VSCode to run a bash shell for its terminal by adding the line:

"": "C:\\Windows\\sysnative\\bash.exe"

into your User Settings file (by going through File/Preferences/Settings). See for more info.

1 Like

Oh! Great!
Works fine! Thank you :slight_smile:

You’re most welcome - glad you got it sorted.

Sorry for hijacking this threat!

I have a related problem. I am able to ssh onto my openhab-system via VS Code, but from the look at the video shown on github I migth not be doing it the intended (shorter) way.

OS: Windows 10
Additionally installed Ubuntu and enabled WSL.

In VS Code I can open a teminal (bash) SSH onto my OH system (using the known credentials) and from there I can SSH to Karaf (ssh -p 8101 openhab@localhost). Looking at the video it was done just with a single click WHERE?, and how is that setup?

See this doc -

Ctrl + Shift + P and type ‘karaf’ - you’ll see “openHAB: Open Karaf console” option.

You can also assign a shortkey to openhab.openKaraf action in VSCode.


THANK YOU very much!

I guess the only thing I’m missing now is the “Karaf exposed to the external interface”.