I am trying to get the public key of a server. This is what I tried:
val serverKey = sshClient.connect("dyn mem", "localhost", "2222")
.verify()
.getSession()
.getKex()
.getServerKey()
The problem is get the result of getServerKey()
is null...
How can I get the public key of a SSH server with the Apache SSHD client.