Skip to content

hostkeys-00@openssh.com unhandled #237

Closed
@TheConstructor

Description

@TheConstructor

According to this mail-thread clients may receive "hostkeys-00@openssh.com" after authentication. While OpenSSH-6.9-Release-Notes already list issues with Terra Term, it seems your software is also affected.

If net.schmizz.sshj.userauth.UserAuthImpl#handle is called post-auth with a GLOBAL_REQUEST like hostkeys-00@openssh.com it will simply throw a NullPointerException, if the message is received before currentMethod is set to null you get the following stack-trace:

Caused by: net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
    at net.schmizz.sshj.SSHClient.auth(SSHClient.java:232) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:331) ~[sshj-0.15.0.jar:na]
    ...
            ... 3 common frames omitted
Caused by: net.schmizz.sshj.userauth.UserAuthException: Received SSH_MSG_UNIMPLEMENTED while exchanging keys
    at net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:33) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:26) ~[sshj-0.15.0.jar:na]
    at net.schmizz.concurrent.Promise.deliverError(Promise.java:95) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.userauth.UserAuthImpl.notifyError(UserAuthImpl.java:151) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:597) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.transport.Reader.run(Reader.java:68) ~[sshj-0.15.0.jar:na]
Caused by: net.schmizz.sshj.transport.TransportException: Received SSH_MSG_UNIMPLEMENTED while exchanging keys
    at net.schmizz.sshj.transport.TransportImpl.gotUnimplemented(TransportImpl.java:574) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:506) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:107) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.transport.Decoder.received(Decoder.java:175) ~[sshj-0.15.0.jar:na]
    at net.schmizz.sshj.transport.Reader.run(Reader.java:60) ~[sshj-0.15.0.jar:na]

I am connecting against a OpenSSH_7.1p2-hpn14v10, OpenSSL 1.0.2f 28 Jan 2016 server on a raspberry pi. Distribution is Gentoo.

Strangely this error only occurs once every 5-10 connections. I used the debugger to verify it actually is a hostkeys-00@openssh.com-message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions