Packet corrupt

Help
Shai Dagan
2013-03-03
2013-05-28
  • Shai Dagan
    Shai Dagan
    2013-03-03

    Hi,

    I use jsch-0.1.49 to connect to a proprietary SSH server and I get unexpected disconnections.

    When a disconnection occurs with JSch logging enabled, I see the following message in the log file:

    INFO: Caught an exception, leaving main loop due to Packet corrupt
    INFO: Disconnecting from w.x.y.z port 22

    I tried replacing the encryption algorithm, but I still get disconnections. In some cases I get the same 'Packet corrupt' error and in other cases the error changes to 'read timeout' or 'end of I/O stream'.

    The log of a typical connection setup is:

    INFO: Connecting to w.x.y.z port 22
    INFO: Connection established
    INFO: Remote version string: SSH-1.99-GCI
    INFO: Local version string: SSH-2.0-JSCH-0.1.49
    INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
    INFO: aes256-ctr is not available.
    INFO: aes192-ctr is not available.
    INFO: aes256-cbc is not available.
    INFO: aes192-cbc is not available.
    INFO: arcfour256 is not available.
    INFO: CheckKexes: diffie-hellman-group14-sha1
    INFO: SSH_MSG_KEXINIT sent
    INFO: SSH_MSG_KEXINIT received
    INFO: kex: server: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
    INFO: kex: server: ssh-rsa
    INFO: kex: server: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
    INFO: kex: server: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
    INFO: kex: server: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    INFO: kex: server: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    INFO: kex: server: none
    INFO: kex: server: none
    INFO: kex: server: 
    INFO: kex: server: 
    INFO: kex: client: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1
    INFO: kex: client: ssh-rsa,ssh-dss
    INFO: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
    INFO: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
    INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
    INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
    INFO: kex: client: none
    INFO: kex: client: none
    INFO: kex: client: 
    INFO: kex: client: 
    INFO: kex: server->client aes128-ctr hmac-md5 none
    INFO: kex: client->server aes128-ctr hmac-md5 none

    Can you please comment on what these errors mean? What would make a packet corrupt? Has the issue been observed before?

    I'd like to be able to tell the SSH server support exactly what is wrong.

    Thanks in advance,
    Shai