I am trying to use the JSch class ( Java Secure Channel ; jsch-0.1.50.jar) to connect to an SFTP server and send the file from the ColdFusion application (9.0.2) (which runs on Java 1.7.0_15). The main code in question is:
jsch = classLoader.create("com.jcraft.jsch.JSch").init(); // ColdFusion-specific to load the jar jschSession = jsch.getSession("myusername", "ftp.example.com", 22); jschSession.setConfig("StrictHostKeyChecking", "no"); jschSession.setTimeout(60000); jschSession.setPassword("mypassword"); jschSession.connect();
After connecting to Serv-U to the SFTP server, it causes the following error on the Serv-U side immediately after opening the connection:
SSH Protocol Error: packet size exceeds maximum allowed.
Serv-U then closes the session, after which JSch throws an exception:
Session.connect: java.io.IOException: End of IO Stream Read
I am new to the JSch class and maybe I am missing something obvious, but I donβt understand where the error might be. Connecting to the same SFTP server from the same source with WinSCP gives no errors. Any tips on what the code is doing wrong or where to go for troubleshooting?
source share