Hi Joe,

Thanks for the solution....it worked.

-Deepesh


On Fri, Jun 17, 2011 at 11:48 AM, Deepesh Naidu <deepesh.na...@gmail.com>wrote:

> Hi Joe,
>
> We are using OpenSSH service but will have to see if we installed cygwin or
> something else.
> Thanks.
>
> -Deepesh
>
>
> On Fri, Jun 17, 2011 at 11:44 AM, Magid, J. (Joe) <joseph.ma...@us.ing.com
> > wrote:
>
>> **
>> Even though you are connecting to a Windows server, the sFTP service you
>> are connecting to is highly likely to be acting as if it were on a Unix box;
>> we've got Cygwin installed and an OpenSSH service running. So that service
>> is going to see the c drive on the box it's on as /cygdrive/c.
>>
>> We've done an ssh connection to our destination Windows file server using
>> the login service ID, created a folder called /opt (from the "root"
>> perspective of the logged in session) and then created symlinks in that
>> folder to point to the appropriate folders where data is to be dropped to
>> make them addressable without having to use the /cygdrive reference.
>>
>>
>>  ------------------------------
>> *From:* Deepesh Naidu [mailto:deepesh.na...@gmail.com]
>> *Sent:* Friday, June 17, 2011 11:32 AM
>>
>> *To:* Magid, J. (Joe)
>> *Cc:* jsch-users@lists.sourceforge.net
>> *Subject:* Re: [JSch-users] Cannot sftp files from linux server to
>> windows server
>>
>> Hi All,
>>
>> Thanks for all the suggestions.
>> I have been able to successfully SFTP files to a remote windows server
>> from a linux server.
>> The issue I was facing is as follows:
>>
>> My previous code:
>>  Channel channel = null;
>> ChannelSftp c = null;
>> channel = session.openChannel("sftp");
>> channel.connect();
>> c = (ChannelSftp)channel;
>> *c.cd("C:\\"); ----- This is what was creating an issue.*
>> *
>> *
>> I then checked what my home directory is and i found out that it was
>> following a pattern of */abc/xyz*.
>> *
>> *
>> So I changed the last line of the code to c.cd("/abc/xyz") and it is
>> working fine.
>> The folder /abc/xyz resides in the home directory of the ssh
>> folder...where all the user credentials are entered.
>> That directory happens to be C:\Program Files\somefolder.
>>
>> Now I am trying to sftp some files into the C:\ folder, but I have not
>> been able to reach that folder as it will not go beyond C:\Program
>> Files\somefolder. I am still working on this part but haven't made any
>> headway. Any pointers on that.
>> But atleast we got somewhere.
>>
>>
>> -Deepesh
>>
>>
>> *
>> *
>> On Fri, Jun 17, 2011 at 11:16 AM, Magid, J. (Joe) <
>> joseph.ma...@us.ing.com> wrote:
>>
>>> **
>>> Are you opening an sftp channel or are you doing an scp connect via an
>>> exec channel?
>>>
>>> If the latter (which is what we do) is the user/service ID that you are
>>> using to connect to the Windows server in either the Admin or Power Users
>>> group? Scp requires login rights for the login id.
>>>
>>> As per Paul's suggestion, please
>>> post your code so we can see what you're doing to better help you resolve 
>>> the issue.
>>>
>>>
>>>  ------------------------------
>>>  *From:* Deepesh Naidu [mailto:deepesh.na...@gmail.com]
>>> *Sent:* Friday, June 17, 2011 08:16 AM
>>> *To:* Magid, J. (Joe)
>>> *Cc:* jsch-users@lists.sourceforge.net
>>> *Subject:* Re: [JSch-users] Cannot sftp files from linux server to
>>> windows server
>>>
>>>   No, I don't have trailing in the file name.
>>> I tried with hard coding the file name too.
>>> But it just doesn't work for transferring files to a remote windows
>>> server.
>>>
>>> -Deepesh
>>>
>>>
>>> On Thu, Jun 16, 2011 at 6:11 PM, Magid, J. (Joe) <
>>> joseph.ma...@us.ing.com> wrote:
>>>
>>>> **
>>>> Do you have a trailing / after the file name by any chance?
>>>>
>>>>
>>>> ~~~~~~~~~~~~~~~~~~~~~~~
>>>> Joe Magid
>>>> Senior Developer
>>>> ING - Annuity Manufacturing IT Production Support
>>>> joseph.ma...@us.ing.com
>>>>
>>>>
>>>>  ------------------------------
>>>> *From:* Deepesh Naidu [mailto:deepesh.na...@gmail.com]
>>>> *Sent:* Thursday, June 16, 2011 06:09 PM
>>>> *To:* jsch-users@lists.sourceforge.net
>>>> *Subject:* [JSch-users] Cannot sftp files from linux server to windows
>>>> server
>>>>
>>>>   Hi All,
>>>>
>>>> I am using jsch to tranfer files via jsch.
>>>> I am able to transfer files from linux servers to other linux servers.
>>>> But when I am trying to transfer files from a linux server to a windows
>>>> server...it is throwing me 'No Such File' error.
>>>>
>>>> I am using jsch 0.1.44 version.
>>>> Is there a work around for this ?
>>>> Any help would be appreicated.
>>>>
>>>> -Deepesh
>>>>
>>>> ---------------------------------------------------------
>>>>
>>>> NOTICE: The information contained in this electronic mail message is 
>>>> confidential and intended only for certain recipients.  If you are not an 
>>>> intended recipient, you are hereby notified that any disclosure, 
>>>> reproduction, distribution or other use of this communication and any 
>>>> attachments is strictly prohibited.  If you have received this 
>>>> communication in error, please notify the sender by reply transmission and 
>>>> delete the message without copying or disclosing it.
>>>>
>>>> ============================================================================================
>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to