Hello ,

Could you please let us know how do we resolve this issue. This is very urgent and blocking for us.

Thanks and Regards,
Usha L




From:        Anurag Panda/India/IBM
To:        ymnk@jcraft.com (Atsuhiko Yamanaka)
Cc:        Usha Ladkani/India/IBM@IBMIN
Date:        04/03/2013 04:12 PM
Subject:        Re: [JSch-users] com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read



Hi,

I tried connecting to OpenSSH 6.2p1. But the algorithm negotiation failed as matching HMAC algorithms were not found. I am pasting the log statements below. hmac-sha2-256 is not supported in OpenSSH 6.2p1. So possibly it is not supported in OpenSSH 6.0p1 also, with which you have tested.

Log statements:

INFO: Connecting to 9.113.226.52 port 22

INFO: Connection established

INFO: Remote version string: SSH-2.0-OpenSSH_6.2

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-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

INFO: kex: server: ssh-rsa,ssh-dss

INFO: kex: server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se

INFO: kex: server: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se

INFO: kex: server: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96

INFO: kex: server: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96

INFO: kex: server: none,zlib@openssh.com

INFO: kex: server: none,zlib@openssh.com

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: blowfish-cbc

INFO: kex: client: blowfish-cbc

INFO: kex: client: hmac-sha2-256

INFO: kex: client: hmac-sha2-256

INFO: kex: client: none

INFO: kex: client: none

INFO: kex: client:

INFO: kex: client:

INFO: Disconnecting from 9.113.226.52 port 22

com.jcraft.jsch.JSchException: Algorithm negotiation fail

        at com.jcraft.jsch.Session.receive_kexinit(Session.java:559)

        at com.jcraft.jsch.Session.connect(Session.java:299)

        at com.jcraft.jsch.Session.connect(Session.java:162)

        at SFTP1.connect(SFTP1.java:48)

        at SFTP1.main(SFTP1.java:17)

Thanks & regards,

Anurag,
Advisory Software Engineer,
WPG, MEG, B2B & Commerce, Industry Solutions, ISL, IBM,
#4/1, 2nd floor, Tower D, IBC Knowledge Park, Bannerghatta road, Bangalore, India - 560029.
Phone (O): +91-80-49126451, ext: 26451, Tie-line: 26451.




From:        ymnk@jcraft.com (Atsuhiko Yamanaka)
To:        Usha Ladkani/India/IBM@IBMIN,
Cc:        jsch-users@lists.sourceforge.net, Anurag Panda/India/IBM@IBMIN
Date:        03/29/2013 02:45 PM
Subject:        Re: [JSch-users] com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read





Hi,

  +-From: Usha Ladkani <uladkani@in.ibm.com> --
  |_Date: Thu, 28 Mar 2013 14:23:25 +0530 _____
  |
  |We are using JSCH library to implement our SFTP client.
  |We need to use hmac 256 and hmac 512  algorithm so as to make our client
  |NIST SP 800 enabled.
  |We found that jsch-0.1.49 supports hmac 256.
  |I have implemented the code to have
  ...

  |config.put("cipher.c2s", "3des-cbc,aes192-cbc,aes128-cbc,aes256-cbc");
  |config.put("mac.c2s", "hmac-sha2-256");
  |session.setConfig(config);
  |session.connect();
  ...
  |com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End
  |of IO Stream Read

I could not reproduce such an exception with Sun's java6u29 running on
Ubuntu10 in connecting to the sshd of OpenSSH 6.0p1 on Ubuntu 12.10.
It is helpful if you show how to reproduce that exception.


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
Skype callto://jcraft/
Twitter:
http://twitter.com/ymnk
Facebook:
http://facebook.com/aymnk