Could be many things such as bad file permissions.
Try ssh -v plus debug level (edit /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg as console does not work) on org.apache.karaf.
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 8101.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version SSHD-CORE-1.7.0
debug1: no match: SSHD-CORE-1.7.0
debug1: Authenticating to localhost:8101 as ‘openhab’
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 127.0.0.1 port 8101
I cannot replicate this, so it’s not an issue of the snapshot build… something else is wrong with your system…
checking the verbose output now for hints
Check file access rights on your local private key (~/.ssh/identity.*) and if the matching public key (still) is in /var/lib/openhab2/etc/keys.properties
For som reason I do not have any of those files anylonger
key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version SSHD-CORE-1.7.0
debug1: no match: SSHD-CORE-1.7.0
debug1: Authenticating to localhost:8101 as ‘openhab’
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 127.0.0.1 port 8101
they are not really needed… ssh client is checking if they exist. this is not the root-cause
they also don’t exist on my system and i can use root to ssh into karaf console
did you configure in the past key based authentication for the console?
so if you didn’t use key auth but want to use password auth, the file to specify that in is users.properties so check if there’s anything bad in there.
Either way, proper path to debugging is to enable server side logging as I mentioned above.