clem created SSHD-1040:
--------------------------
Summary: get the server key
Key: SSHD-1040
URL: https://issues.apache.org/jira/browse/SSHD-1040
Project: MINA SSHD
Issue Type: Bug
Affects Versions: 2.5.1, 2.4.0, 2.5.0, 2.3.0, 2.2.0
Reporter: clem
Fix For: 2.1.0
Hello,
There's a bug for get the public key of a server from version 2.2.0.
On the version 2.1.0, it works :
*Code :*
{code:java}
SshClient client = SshClient.setUpDefaultClient();
client.start();
ConnectFuture connectFuture = client.connect("xxx", "xxx", 22);
connectFuture.await(10000);
ClientSession session = connectFuture.getSession();
session.waitFor(Arrays.asList(ClientSessionEvent.WAIT_AUTH), 10000);
System.out.println(session.getKex().getServerKey().toString());
{code}
*Result :*
{noformat}
Sun RSA public key, 2048 bits
modulus: xxx
public exponent: 35{noformat}
*And with a higher version, the result is :*
{noformat}
Exception in thread "main" java.lang.NullPointerExceptionException in thread
"main" java.lang.NullPointerException at test.test.main(test.java:27){noformat}
line 27 is :
{code:java}
System.out.println(session.getKex().getServerKey().toString());
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]