java - Jsch : End of IO Stream Read -


i'm using jsch create ssh connection between app , service, service has authentication must passed along connection tunnel, used ssh following way:

session session = jsch.getsession("user_name", "service_url.com", 1443); properties config = new properties();  config.put("kex", "diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1"); //config.put("kex", "diffie-hellman-group-exchange-sha256"); //tried individually  //config.put("kex", "diffie-hellman-group1-sha1"); //tried individually config.put("stricthostkeychecking", "no");  session.setconfig(config); session.setpassword("abc123"); try{     session.connect(5000); // exception raises here }catch(jschexception hs){     hs.printstacktrace(); // exception caught here }  

but when reaching session.connect() i'm getting following exception before waiting 5000 ms mentioned in connect() method:

com.jcraft.jsch.jschexception: session.connect: java.io.ioexception: end of io stream read     @ com.jcraft.jsch.session.connect(session.java:558)     @ com.example.updaterjschtest.mainactivity$1$1.run(mainactivity.java:132)     @ java.lang.thread.run(thread.java:818) 

worth mention came across this question , this question answers didn't help.


using putty:

enter image description here

putty log:

=~=~=~=~=~=~=~=~=~=~=~= putty log 2016.07.28 14:02:35 =~=~=~=~=~=~=~=~=~=~=~= event log: writing new session log (ssh packets mode) file: d:\mcs\mcs tools\putty\putty.log event log: looking host "update.solaceautomation.com" event log: connecting 192.168.46.2 port 1443 event log: server version: ssh-2.0-solace_cloud_service event log: claim version: ssh-2.0-putty_release_0.60 outgoing packet type 20 / 0x14 (ssh2_msg_kexinit)   .  .   00000250  00 00 00 00 00 00 00 00                          ........ event log: using ssh protocol version 2 incoming packet type 20 / 0x14 (ssh2_msg_kexinit)  .  .    00000250  00 00 00 00 00 00 00 00                          ........  event log: doing diffie-hellman key exchange hash sha-1 outgoing packet type 32 / 0x20 (ssh2_msg_kex_dh_gex_init)  . .   00000250  00 00 00 00 00 00 00 00                          ........  incoming packet type 33 / 0x21 (ssh2_msg_kex_dh_gex_reply) . .    00000250  00 00 00 00 00 00 00 00                          ........  event log: host key fingerprint is: event log: ssh-rsa 1024 bd:11:03:96:68:b5:c6:34:41:19:a3:fa:41:46:a7:52 outgoing packet type 21 / 0x15 (ssh2_msg_newkeys) event log: initialised aes-256 sdctr client->server encryption event log: initialised hmac-sha1 client->server mac algorithm incoming packet type 21 / 0x15 (ssh2_msg_newkeys) event log: initialised aes-256 sdctr server->client encryption event log: initialised hmac-sha1 server->client mac algorithm outgoing packet type 5 / 0x05 (ssh2_msg_service_request)   00000000  00 00 00 0c 73 73 68 2d 75 73 65 72 61 75 74 68  ....ssh-userauth incoming packet type 6 / 0x06 (ssh2_msg_service_accept)   00000000  00 00 00 0c 73 73 68 2d 75 73 65 72 61 75 74 68  ....ssh-userauth outgoing packet type 50 / 0x32 (ssh2_msg_userauth_request)   .   .   00000030  74 69 6f 6e 00 00 00 04 6e 6f 6e 65              tion....none incoming packet type 51 / 0x33 (ssh2_msg_userauth_failure)   00000000  00 00 00 08 70 61 73 73 77 6f 72 64 00           ....password. outgoing packet type 50 / 0x32 (ssh2_msg_userauth_request)  .  .   00000040  00 xx xx xx xx xx xx xx xx xx xx                 .xxxxxxxxxx outgoing packet type 2 / 0x02 (ssh2_msg_ignore)   .   .   00000090  61 de 51 94                                      a.q. event log: sent password incoming packet type 52 / 0x34 (ssh2_msg_userauth_success) event log: access granted outgoing packet type 90 / 0x5a (ssh2_msg_channel_open)   00000000  00 00 00 07 73 65 73 73 69 6f 6e 00 00 01 00 00  ....session.....   00000010  00 40 00 00 00 40 00                             .@...@. incoming packet type 91 / 0x5b (ssh2_msg_channel_open_confirmation)   00000000  00 00 01 00 00 00 00 00 00 00 40 00 00 00 40 00  ..........@...@. event log: opened channel session outgoing packet type 98 / 0x62 (ssh2_msg_channel_request)   00000000  00 00 00 00 00 00 00 07 70 74 79 2d 72 65 71 01  ........pty-req.   00000010  00 00 00 05 78 74 65 72 6d 00 00 00 50 00 00 00  ....xterm...p...   00000020  18 00 00 00 00 00 00 00 00 00 00 00 10 03 00 00  ................   00000030  00 7f 80 00 00 96 00 81 00 00 96 00 00           ............. incoming packet type 99 / 0x63 (ssh2_msg_channel_success)   00000000  00 00 01 00                                      .... event log: allocated pty (ospeed 38400bps, ispeed 38400bps) outgoing packet type 98 / 0x62 (ssh2_msg_channel_request)   00000000  00 00 00 00 00 00 00 05 73 68 65 6c 6c 01        ........shell. incoming packet type 99 / 0x63 (ssh2_msg_channel_success)   00000000  00 00 01 00                                      .... event log: started shell/command 


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -