Hi Atsuhiko,

We faced one problem while implementing the put function that has been
provided in the recent jar file "jsch-0.1.42.jar". Our requirement is, we
need to put a file to an Unix server, which acts as a router. This server,
based on the directory path and file name, will route the file to
the destination servers. The router server will work only when the path that
it can recognize. If we made any change in the path that will not work.

We contacted technical support people and they told like we cannot append
user working directory path (/home/XXXXX) at the beginning of the remote
directory path if the path is not having "/" at the beginning. Instead of
that they suggested like if we can place "./" (where "." represents the
current working directory) will help us to send the file to the destination
server through router server.

When I look into the put logic, we are calling a function
"remoteAbsolutePath". The logic for this function is as follows:

>
> private String remoteAbsolutePath(String s)
>         throws SftpException
>     {
>         if(s.charAt(0) == '/')
>             return s;
>         String s1 = getCwd();
>         if(s1.endsWith("/"))
>             return s1 + s;
>         else
>             return s1 + "/" + s;
>     }
>
> Is it possible for you to change the logic as follows?
>
>     private String remoteAbsolutePath(String s)
>         throws SftpException
>     {
>         if((s.charAt(0) == '/') || (s.charAt(0) == '.'))
>             return s;
>         String s1 = getCwd();
>         if(s1.endsWith("/"))
>             return s1 + s;
>         else
>             return s1 + "/" + s;
>     }
>

 Since "." represents current working directory, it may not require to
append anything before. Could you please run a test from your side and see
how it works. We are getting this problem for only one server, because it is
acting like a router but not exact server.

JSch users,

Please go through my above comments and suggest what is the best thing can
be done in this case.

Please help me on this. I got struck with one server. Every thing else is
working fine.

Thanks in advance for your inputs and help.

With regards
KRP

>
>
>
>   On Wed, Jan 6, 2010 at 1:56 AM, Atsuhiko Yamanaka <[email protected]>wrote:
>
>> Hi,
>>
>>   +-From: Rajendra Prasad <[email protected]> --
>>   |_Date: Tue, 5 Jan 2010 20:25:27 -0600 ____________
>>   |
>>   |We are getting the following error, when we are trying to transfer the
>> file
>>   |through SFTP to one of our remote server:
>>   |*Unable to execute put command. 3: XXXX has Rejected this Transmission:
>>   |Error - User "XXXXXXXX" deliver data request failed due to an
>>   |<System>detected error. Please recheck your data transmission options.
>>   |If you are
>>   |still experiencing problems, please contact the <System> Help Desk.*
>>   |Note: Connection is successful
>>
>> Frankly to say, we have not found the reason for this error, and
>> it will be difficult to find it without reproducing that problem in our
>> environment or getting accesses to that remote server.
>>
>>   |We were able to transfer the files to other UNIX systems using
>> customized
>>   |services using the jar file jsch-0.1.39.jar except one server. We could
>> not
>>   |understand the reason for failure for only one system.
>>   |This is a very urgent requirement. Can anyone help us on this?
>>
>> Will every sftp put trial be failed?
>>
>>
>> Sincerely,
>> --
>> Atsuhiko Yamanaka
>> JCraft,Inc.
>> 1-14-20 HONCHO AOBA-KU,
>> SENDAI, MIYAGI 980-0014 Japan.
>> Tel +81-22-723-2150
>>    +1-415-578-3454
>> Skype callto://jcraft/
>> Twitter: @ymnk
>>
>
>
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to