tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

One Star

tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

Hi everbody,
i'm facing a problem with the componenet tFTPconnection, whitch i use to connect to a secure ftp with login/password untill yesterday it was ok, today it gives me the error showen in the pcture i tried to change the jsch.jar to the newest version but no success.
Could you please help.
Regards,
Amine
Seventeen Stars

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

What do you have changed yesterday?
The problem looks like the protocol on the server side has been changed (not a SFTP anymore) or there is a network problem.
One Star

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

I didn't change any thing, the only access that i have in that server is via sftp filezilla work but talend no.
Seventeen Stars

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

You told us, since yesterday it does not work... Something must have been changed obviously. Your task is now to ask the server administrators what has been changed.
One Star

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

I sent an email to the administrators, i'm waiting for their response i will whrite you back when they answer me.
Thanks for your help
Highlighted
One Star

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

Hello,
Server administrators said that nothing has changed, but i think that the algorithm used in there server has changed (i'm not sure).
i did severel tests this week trying to baypass the problem by java, i wrote a routine as below:
JSch jsch = new JSch();
        session = jsch.getSession(SFTPUSER,SFTPHOST,SFTPPORT);
        session.setPassword(SFTPPASS);
       
        java.util.Properties config = new java.util.Properties();
        config.put("kex", "diffie-hellman-group1-sha1,diffie-hellman-group14-sha1");
        config.put("StrictHostKeyChecking", "no");
           session.setConfig(config);
           session.connect(300000);
           channel = session.openChannel("sftp");
           channel.connect();
With this code it gives me the error ===> com.jcraft.jsch.JSchException: Algorithm negotiation fail
when i added the algos diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256 it gives me the first error : com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read
    JSch jsch = new JSch();
        session = jsch.getSession(SFTPUSER,SFTPHOST,SFTPPORT);
        session.setPassword(SFTPPASS);
       
        java.util.Properties config = new java.util.Properties();
 
        config.put("kex", "diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256");
        config.put("StrictHostKeyChecking", "no");
           session.setConfig(config);
           session.connect(300000);
           channel = session.openChannel("sftp");
           channel.connect();
Regards,
Amine
Seventeen Stars

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

Looks good. Did you succeed with this code?
One Star

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

No, it gives the same error as the componenet tFTPconnection com.jcraft.jsch.JSchException: Session.connect: java.io.IOException: End of IO Stream Read, the problem is that i can connect to the server via filezilla.
I keep investigating ...
Seventeen Stars

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

Could you show us the connection properties you have used in FileZilla? I am pretty confident it will be covered by this API. 
One Star

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

Below how it looks the connection via filezilla, i'didn't use i specific configuration
One Star

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

Hello,
I add this log from winscp connecting to the same server if it could help:
2015-12-21 15:27:03.515 WinSCP Version 5.7.6 (Build 5874) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Standard)
. 2015-12-21 15:27:03.516 Configuration: C:\Users\CHHIH\Downloads\winscp576\WinSCP.ini
. 2015-12-21 15:27:03.516 Log level: Normal
. 2015-12-21 15:27:03.516 Local account: FRANCE\CHHIH
. 2015-12-21 15:27:03.516 Working directory: C:\Users\CHHIH\Desktop\TOS_DI-20141024_1545-V5.6.0\TOS_DI-20141024_1545-V5.6.0
. 2015-12-21 15:27:03.516 Process ID: 584
. 2015-12-21 15:27:03.516 Time zone: Current: GMT+1, Standard: GMT+1 (Romance Standard Time), DST: GMT+2 (Romance Daylight Time), DST Start: 29/03/2015, DST End: 25/10/2015
. 2015-12-21 15:27:03.516 Login time: lundi 21 décembre 2015 15:27:03
. 2015-12-21 15:27:03.516 --------------------------------------------------------------------------
. 2015-12-21 15:27:03.517 Script: Retrospectively logging previous script records:
> 2015-12-21 15:27:03.517 Script: open sftp://obk-atlasformen:***@3banken.mbsip.com/
. 2015-12-21 15:27:03.517 --------------------------------------------------------------------------
. 2015-12-21 15:27:03.517 Session name: obk-atlasformen@3banken.mbsip.com (Ad-Hoc site)
. 2015-12-21 15:27:03.517 Host name: 3banken.mbsip.com (Port: 22)
. 2015-12-21 15:27:03.517 User name: obk-atlasformen (Password: Yes, Key file: No)
. 2015-12-21 15:27:03.517 Tunnel: No
. 2015-12-21 15:27:03.517 Transfer Protocol: SFTP
. 2015-12-21 15:27:03.517 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-12-21 15:27:03.517 Disable Nagle: No
. 2015-12-21 15:27:03.517 Proxy: none
. 2015-12-21 15:27:03.517 Send buffer: 262144
. 2015-12-21 15:27:03.517 SSH protocol version: 2; Compression: No
. 2015-12-21 15:27:03.517 Bypass authentication: No
. 2015-12-21 15:27:03.517 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2015-12-21 15:27:03.517 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-12-21 15:27:03.517 KEX: dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN
. 2015-12-21 15:27:03.517 SSH Bugs: A,A,A,A,A,A,A,A,A,A,A,A
. 2015-12-21 15:27:03.517 Simple channel: Yes
. 2015-12-21 15:27:03.517 Return code variable: Autodetect; Lookup user groups: A
. 2015-12-21 15:27:03.517 Shell: default
. 2015-12-21 15:27:03.517 EOL: 0, UTF: 2
. 2015-12-21 15:27:03.517 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-12-21 15:27:03.517 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-12-21 15:27:03.517 SFTP Bugs: A,A
. 2015-12-21 15:27:03.517 SFTP Server: default
. 2015-12-21 15:27:03.517 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-12-21 15:27:03.517 Cache directory changes: Yes, Permanent: Yes
. 2015-12-21 15:27:03.517 DST mode: 1
. 2015-12-21 15:27:03.517 --------------------------------------------------------------------------
. 2015-12-21 15:27:03.517 Looking up host "3banken.mbsip.com"
. 2015-12-21 15:27:03.596 Connecting to 193.138.123.210 port 22
. 2015-12-21 15:27:03.712 Server version: SSH-2.0-OpenSSH_6.6.1
. 2015-12-21 15:27:03.713 Using SSH protocol version 2
. 2015-12-21 15:27:03.713 We claim version: SSH-2.0-WinSCP_release_5.7.6
. 2015-12-21 15:27:03.767 Doing Diffie-Hellman group exchange
. 2015-12-21 15:27:03.915 Doing Diffie-Hellman key exchange with hash SHA-256
. 2015-12-21 15:27:05.007 Verifying host key rsa2 0x23,0xc516539810e82e5f bf526738d5d96bb2 1694d97381c3558a f01b1edec0c2bd8c 78ca55ecdff618e2 7b1a97f7d51e7978 1d4f32cbca24ba3e 1b7e6a9f0415dd6b e5e8a8d60277dd04 84d8ee9adb604142 9f727a95e88cb3f8 b461f98e0f553493 4d6b469d9ce94662 3ad29b4a0a36ec50 ca09cb05ef88d0ad db82d39f685b98fd  with fingerprint ssh-rsa 1024 ee:fb:c3:b2:65:0f:58:8a:d5:6f:97:e3:c7:60:d9:45
. 2015-12-21 15:27:05.008 Host key matches cached key
. 2015-12-21 15:27:05.008 Host key fingerprint is:
. 2015-12-21 15:27:05.008 ssh-rsa 1024 ee:fb:c3:b2:65:0f:58:8a:d5:6f:97:e3:c7:60:d9:45
. 2015-12-21 15:27:05.008 Initialised AES-256 SDCTR client->server encryption
. 2015-12-21 15:27:05.008 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2015-12-21 15:27:05.008 Initialised AES-256 SDCTR server->client encryption
. 2015-12-21 15:27:05.008 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2015-12-21 15:27:05.151 Using username "obk-atlasformen".
. 2015-12-21 15:27:05.207 Attempting keyboard-interactive authentication
. 2015-12-21 15:27:05.274 Prompt (keyboard interactive, "SSH server authentication", "Using keyboard-interactive authentication.", "Password: ")
. 2015-12-21 15:27:05.274 Using stored password.
. 2015-12-21 15:27:05.412 Prompt (keyboard interactive, "SSH server authentication", <no instructions>, <no prompt>)
. 2015-12-21 15:27:05.412 Ignoring empty SSH server authentication request
. 2015-12-21 15:27:05.468 Access granted
. 2015-12-21 15:27:05.468 Opening session as main channel
. 2015-12-21 15:27:05.521 Opened main channel
. 2015-12-21 15:27:05.665 Started a shell/command
. 2015-12-21 15:27:05.665 --------------------------------------------------------------------------
. 2015-12-21 15:27:05.665 Using SFTP protocol.
. 2015-12-21 15:27:05.666 Doing startup conversation with host.
> 2015-12-21 15:27:05.666 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2015-12-21 15:27:05.722 Type: SSH_FXP_VERSION, Size: 150, Number: -1
. 2015-12-21 15:27:05.722 SFTP version 3 negotiated.
. 2015-12-21 15:27:05.722 Unknown server extension posix-rename@openssh.com="1"
. 2015-12-21 15:27:05.722 Supports statvfs@openssh.com extension version "2"
. 2015-12-21 15:27:05.722 Unknown server extension fstatvfs@openssh.com="2"
. 2015-12-21 15:27:05.722 Supports hardlink@openssh.com extension version "1"
. 2015-12-21 15:27:05.722 Unknown server extension fsync@openssh.com="1"
. 2015-12-21 15:27:05.722 We believe the server has signed timestamps bug
. 2015-12-21 15:27:05.722 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 string are not mandatory
. 2015-12-21 15:27:05.722 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2015-12-21 15:27:05.722 Getting current directory name.
. 2015-12-21 15:27:05.722 Getting real path for '.'
> 2015-12-21 15:27:05.722 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2015-12-21 15:27:05.782 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2015-12-21 15:27:05.782 Real path is '/'
. 2015-12-21 15:27:05.782 Startup conversation with host finished.
< 2015-12-21 15:27:05.782 Script: Active session: obk-atlasformen@3banken.mbsip.com
Regards,
Amine
Five Stars

Re: tFTPconnection om.jcraft.jsch.JSchException: Session.connect: java.io.

are there any new Information? did you solve the Problem? can somebody tell us here a solution?

thanks in advanced