Re: [JSch-users] Cannot sftp files from linux server to windows server
Status: Alpha
Brought to you by:
ymnk
From: Deepesh N. <dee...@gm...> - 2011-06-17 15:32:02
|
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) <Jos...@us...>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:dee...@gm...] > *Sent:* Friday, June 17, 2011 08:16 AM > *To:* Magid, J. (Joe) > *Cc:* jsc...@li... > *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) <Jos...@us...>wrote: > >> ** >> Do you have a trailing / after the file name by any chance? >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~ >> Joe Magid >> Senior Developer >> ING - Annuity Manufacturing IT Production Support >> Jos...@us... >> >> >> ------------------------------ >> *From:* Deepesh Naidu [mailto:dee...@gm...] >> *Sent:* Thursday, June 16, 2011 06:09 PM >> *To:* jsc...@li... >> *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. >> >> ============================================================================================ >> >> > |