Hi Keshav,

Looking at SftpOperations.java[1] it is obvious that both these
configuration parameters are set automatically when defining a
compression level above 0.

[1] 
https://github.com/apache/camel/blob/master/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java

// Pontus

On Sat, Sep 20, 2014 at 7:09 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> On Tue, Sep 16, 2014 at 1:06 PM, Baweja, Keshav
> <keshav.baw...@jpmorgan.com.invalid> wrote:
>> Hello
>>
>> JSch has configuration parameters to set compression algorithm for client to 
>> server and server to client transport.
>>
>> compression.c2s
>>     Compression algorithms for client-to-server transport. The default is 
>> "none", but this library also supports "zlib" and "z...@openssh.com". (Other 
>> compression algorithms can't be put in, it seems.)
>>
>> compression.s2c
>>     Compression algorithms for server-to-client transport. The default is 
>> "none", but this library also supports "zlib" and "z...@openssh.com". (Other 
>> compression algorithms can't be put in, it seems.)
>>
>> Is it possible to set this configuration parameter in Options part of Camel 
>> URI?
>>
>> The only Option I could see on Camel's FTP2 page is below -
>> compression | Default Value = 0 | SFTP Only: Camel 2.8.3/2.9: To use 
>> compression. Specify a level from 1 to 10. Important: You must manually add 
>> the needed JSCH zlib JAR to the classpath for compression support.
>>
>>
>> Does setting this Camel option (with JSch zlib on classpath) automatically 
>> sets both these configuration parameters.
>>
>
> Did you find out about this? If not I suggest to dive into the source
> code of camel-ftp, eg the sftp classes and see what happens in the
> code.
>
>
>
>>
>>
>> Regards
>> Keshav
>>
>>
>> -----Original Message-----
>> From: Baweja, Keshav [mailto:keshav.baw...@jpmorgan.com.INVALID]
>> Sent: Monday, September 15, 2014 2:30 PM
>> To: users@camel.apache.org
>> Subject: RE: JSch connection issue with Maverick SSHD server
>>
>> Thanks for your reply Nodet,
>>
>> The sftp server is hosted externally and is outside our infrastructure. I 
>> can't make any changes to the server, and need to make client work with the 
>> server configuration.  Would you know how I can do it, found the below on 
>> Camel's ftp2 page and guess need to look at this -
>>
>> compression | Default Value = 0 | SFTP Only: Camel 2.8.3/2.9: To use 
>> compression. Specify a level from 1 to 10. Important: You must manually add 
>> the needed JSCH zlib JAR to the classpath for compression support.
>>
>> Regards
>> Keshav
>>
>>
>> -----Original Message-----
>> From: Guillaume Nodet [mailto:gno...@apache.org]
>> Sent: Monday, September 15, 2014 2:15 PM
>> To: users@camel.apache.org
>> Subject: Re: JSch connection issue with Maverick SSHD server
>>
>> Your server is configured with "zlib" compression only, while the client 
>> only supports compression "none", so there's a mismatch and both can't talk 
>> to each other.  You need to configure the server with both "zlib" *and* 
>> "none" compression factories.
>>
>> 2014-09-15 7:39 GMT+02:00 Baweja, Keshav <keshav.baw...@jpmorgan.com.invalid
>>>:
>>
>>> Hello
>>>
>>> I am using Camel 2.13.2 in my application to build up routes to
>>> download files from sftp server locations. The codebase has been
>>> tested ok against 5 different sftp servers. However against one
>>> particular sftp server, JSch the sftp implementation used  by Camel
>>> seems to disconnect immediately after connecting. Could you please
>>> advise what could be the issue here. The log from application is as
>>> below -
>>>
>>> [2014-09-15 05:52:32.236] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] DEBUG
>>> org.apache.camel.component.file.remote.SftpOperations - Using private
>>> keyfile: /home/.ssh/id_rsa
>>> [2014-09-15 05:52:32.238] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] DEBUG
>>> org.apache.camel.component.file.remote.SftpOperations - Using
>>> knownhosts file: /home/.ssh/known_hosts
>>> [2014-09-15 05:52:32.329] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] DEBUG
>>> org.apache.camel.component.file.remote.SftpOperations - Using
>>> StrickHostKeyChecking: no
>>> [2014-09-15 05:52:32.329] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> Connecting to hostname port port
>>> [2014-09-15 05:52:32.462] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> Connection established
>>> [2014-09-15 05:52:32.589] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> Remote
>>> version string: SSH-2.0-Maverick_SSHD
>>> [2014-09-15 05:52:32.589] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> Local
>>> version string: SSH-2.0-JSCH-0.1.50
>>> [2014-09-15 05:52:32.589] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> CheckCiphers:
>>> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des
>>> -ctr,arcfour,arcfour128,arcfour256
>>> [2014-09-15 05:52:32.598] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> CheckKexes: diffie-hellman-group14-sha1
>>> [2014-09-15 05:52:32.621] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> SSH_MSG_KEXINIT sent
>>> [2014-09-15 05:52:32.621] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> SSH_MSG_KEXINIT received
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server: ssh-rsa
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server:
>>> aes128-cbc,aes256-cbc,aes192-cbc,3des-cbc,twofish256-cbc,twofish192-cb
>>> c,twofish128-cbc,blowfish-cbc,cast128-cbc
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server:
>>> aes128-cbc,aes256-cbc,aes192-cbc,3des-cbc,twofish256-cbc,twofish192-cb
>>> c,twofish128-cbc,blowfish-cbc,cast128-cbc
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server: hmac-sha1,hmac-sha1-96
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server: hmac-sha1,hmac-sha1-96
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server: zlib
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server: zlib
>>> [2014-09-15 05:52:32.622] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server:
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> server:
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client:
>>> diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-
>>> group-exchange-sha1
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client: ssh-rsa,ssh-dss
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client:
>>> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256
>>> -cbc
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client:
>>> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256
>>> -cbc
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client: none
>>> [2014-09-15 05:52:32.623] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client: none
>>> [2014-09-15 05:52:32.624] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client:
>>> [2014-09-15 05:52:32.624] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO  
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH -> kex:
>>> client:
>>> [2014-09-15 05:52:32.624] [Camel (camel-1) thread #0 -
>>> sftp://user@hostname:port/data] INFO
>>> org.apache.camel.component.file.remote.SftpOperations - JSCH ->
>>> Disconnecting from hostname port port
>>>
>>> Regards
>>> Keshav
>>>
>>>
>>>
>>> Regards
>>> Keshav
>>>
>>>
>>>
>>> This email is confidential and subject to important disclaimers and
>>> conditions including on offers for the purchase or sale of securities,
>>> accuracy and completeness of information, viruses, confidentiality,
>>> legal privilege, and legal entity disclaimers, available at
>>> http://www.jpmorgan.com/pages/disclosures/email.
>>>
>>
>> This email is confidential and subject to important disclaimers and 
>> conditions including on offers for the purchase or sale of securities, 
>> accuracy and completeness of information, viruses, confidentiality, legal 
>> privilege, and legal entity disclaimers, available at 
>> http://www.jpmorgan.com/pages/disclosures/email.
>>
>> This email is confidential and subject to important disclaimers and 
>> conditions including on offers for the purchase or sale of securities, 
>> accuracy and completeness of information, viruses, confidentiality, legal 
>> privilege, and legal entity disclaimers, available at 
>> http://www.jpmorgan.com/pages/disclosures/email.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/

Reply via email to