Unable to log in to Karaf in VS Code (win10)

I have raspberry openhabian and share files in my pc win10 x64
I m trying to execute this command :

ssh openhab@192.168.1.43 -p 8101 -t ‘log:tail’
Error Message:
Unable to negotiate with 192.168.1.43 port 8101: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

I had installed in win 10 OpenSSh Client (beta)
Also i can see on C:\Users\Hwa Rang.ssh the files "id_****** " and " id_*******.pub "

In raspb via network i see in directory “\David\openhabian \ .ssh” the files 1)authorized_keys and 2)known_hosts

I tried to copy the content form id_***** file to the file of raspb authorized_keys but nothing…
Some help plz!!!
thnx in advance

Open the runtime.cfg in the services folder
You will find an option to set the address mask for the console.
By default the console is only accessible from localhost (127.0.0.1)

i don’t think this is the the problem, since the error message says Unable to negotiate with 192.168.1.43 port 8101: no matching key exchange method found. as he wrote

sadly i don’t have a solution to the no matching key exchange

Did you try with Putty?

with putty i can log in … With Vs Code is the problem

It is possible that you have multiple ssh clients installed. Thus VSCode will use the client which is first in your Environment path.
So the copied key is maybe from the wrong client.
I had a similar problem and uninstalled all clients until a command line ssh showed that no ssh client was installed. Then installed the win ssh client. Thus ensured that the copied key is the right one.

An other thing is enabling PubkeyAuthentication at the rpi.

I managed this through your posts @Josar !!!

PS Microsoft.PowerShell.Core\FileSystem::\David\openHAB2-conf> ssh openhab@David tail -q -f /var/log/openhab2/events.log -f /var/log/openhab2/openhab.log
openhab@david’s password:
Permission denied, please try again.
openhab@david’s password:
Permission denied, please try again.
openhab@david’s password:
openhab@david: Permission denied (publickey,password).

Password:??? openhab? habopen? openhabian pass? I don’t know!!!plz help

https://docs.openhab.org/installation/openhabian.html#raspberry-pi

Connect to your Raspberry Pi SSH console using the username openhabian and password openhabian.

Information for setting up vscode.

1)WITH THIS: “openhab.karafCommand”: “ssh username@%openhabhost% tail -q -f /var/log/openhab2/events.log -f /var/log/openhab2/openhab.log”,
I did>VS Code openHAB Extension! - #215 by Josar

  PS Microsoft.PowerShell.Core\FileSystem::\\David\openHAB2-conf> ssh openhab@David tail -q -f /var/log/openhab2/events.log -f /var/log/openhab2/openhab.log
    openhab@david's password:
    Permission denied, please try again.
    openhab@david's password:
    Permission denied, please try again.
    openhab@david's password:
    openhab@david: Permission denied (publickey,password).

2)WITH THIS COMMAND:“openhab.karafCommand”: “ssh openhab@%openhabhost% -p 8101 -t ‘log:tail’”,

PS Microsoft.PowerShell.Core\FileSystem::\\David\openHAB2-conf> ssh username@David -p 8101 -t 'log:tail'
Unable to negotiate with 192.168.1.43 port 8101: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

So I cant log in with this two options…
What about ?

how to check it
(in putty in the same pc I can log in with openhab-cli console and pass habopen

Firtst try to use the right ssh comand.

ssh openhabian@openhabianpi tail -q -f /var/log/openhab2/events.log -f /var/log/openhab2/openhab.log

Default for openhabian:

username   : openhabian
hostname   : openhabianpi
password   : openhabian (or better you have changed the default.)

But if you have openhabian and you have enough display space you can just use the browser logging by open

http://openhabianpi:9001/

https://docs.openhab.org/installation/openhabian.html#raspberry-pi

1 Like

Thnx.