Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
0683p000009MCYJ.jpg
Labels (2)
11 Replies
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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

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.
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

Looks good. Did you succeed with this code?
Anonymous
Not applicable
Author

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 ...
Anonymous
Not applicable
Author

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

Below how it looks the connection via filezilla, i'didn't use i specific configuration
0683p000009MC6p.jpg 0683p000009MCZx.jpg 0683p000009MCV4.jpg