JSch ssh_rsa_verify: signature false on SSH_MSG_KEX_DH_GEX_REPLY
<p>I am trying to do public/private key authorization, but it only works on some servers.</p>

<p>The below code works when connecting to a local bitwise server, and also when connecting to a local CrushFTP server, but it does not work when connecting to a remote server with version string "SSH-2.0-LiquidSftp"
The same public key has been uploaded to all the servers.</p>

<pre><code>JSch jsch = new JSch();
JSch.setLogger(new Log4jLogger());

jsch.addIdentity("privatekey.ppk", "mySecretPassPhrase");

String host = "someserver.com";
String username = "myUsername";
int port = 1100;

Session session = jsch.getSession(username, host, port);
session.setConfig("StrictHostKeyChecking", "no");
session.setConfig("kex","diffie-hellman-group-exchange-sha1");

UserInfo ui = new MyUserInfo();
session.setUserInfo(ui);
session.connect();
</code></pre>

<p>From the Key Exchange Init messages monitored by Wireshark, and logged in java, I can see that the server support the diffie-hellman-group-exchange-sha1 algorithm, but it fails when trying to verify a signature in the SSH_MSG_KEX_DH_GEX_REPLY</p>

<pre><code>SSH_MSG_KEXINIT sent
SSH_MSG_KEXINIT received
kex: server: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
kex: server: ssh-rsa
kex: server: 3des-cbc,blowfish-cbc,twofish256-cbc,twofish192-cbc,twofish128-cbc,aes256-cbc,aes192-cbc,aes128-cbc,serpent256-cbc,serpent192-cbc,serpent128-cbc,arcfour,idea-cbc,cast128-cbc,none,des-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-ctr,blowfish-ctr,twofish128-ctr,twofish192-ctr,twofish256-ctr,serpent128-ctr,serpent192-ctr,serpent256-ctr,idea-ctr,cast128-ctr,arcfour128,arcfour256
kex: server: 3des-cbc,blowfish-cbc,twofish256-cbc,twofish192-cbc,twofish128-cbc,aes256-cbc,aes192-cbc,aes128-cbc,serpent256-cbc,serpent192-cbc,serpent128-cbc,arcfour,idea-cbc,cast128-cbc,none,des-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-ctr,blowfish-ctr,twofish128-ctr,twofish192-ctr,twofish256-ctr,serpent128-ctr,serpent192-ctr,serpent256-ctr,idea-ctr,cast128-ctr,arcfour128,arcfour256
kex: server: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,none,hmac-ripemd160,hmac-ripemd,hmac-ripemd160@openssh.com,hmac-sha256@ssh.com,hmac-sha256-96@ssh.com,umac-32@openssh.com,umac-64@openssh.com,umac-96@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512
kex: server: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,none,hmac-ripemd160,hmac-ripemd,hmac-ripemd160@openssh.com,hmac-sha256@ssh.com,hmac-sha256-96@ssh.com,umac-32@openssh.com,umac-64@openssh.com,umac-96@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512
kex: server: none,zlib,zlib@openssh.com
kex: server: none,zlib,zlib@openssh.com
kex: server: 
kex: server: 
kex: client: diffie-hellman-group-exchange-sha1
kex: client: ssh-rsa
kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
kex: client: none
kex: client: none
kex: client: 
kex: client: 
kex: server-&gt;client aes128-ctr hmac-md5 none
kex: client-&gt;server aes128-ctr hmac-md5 none

SSH_MSG_KEX_DH_GEX_REQUEST(1024&lt;2048&lt;2048) sent
SSH_MSG_KEX_DH_GEX_INIT sent

ssh_rsa_verify: signature false
</code></pre>

<p>When connecting to the server with putty using the same algorithms and the same private key, everything works, and the wireshark output looks very similar, but the client does not disconnect after the <code>SSH_MSG_KEX_DH_GEX_REPLY</code> has been received.</p>

<p>Any idea what is wrong? Have I missed something obvious?</p>