<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: tFtp, sftp, and remote directory in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372203#M135066</link>
    <description>I have requirement to ftp the file to server where put command should be similar to following: 
&lt;BR /&gt;&amp;gt;sftp user@hostaddress 
&lt;BR /&gt;&amp;gt;password 
&lt;BR /&gt;&amp;gt;cd // 
&lt;BR /&gt;&amp;gt;put localfilename //!remotefilename 
&lt;BR /&gt;Using ChannelSftp, I am having challenge to send the double-qoutes. 
&lt;BR /&gt;In my code, I pass the arguments as following: 
&lt;BR /&gt;JSch jsch = new JSch(); 
&lt;BR /&gt; 
&lt;BR /&gt;Session session = null; 
&lt;BR /&gt;ChannelSftp sftpChannel = null; 
&lt;BR /&gt; 
&lt;BR /&gt; try 
&lt;BR /&gt; { 
&lt;BR /&gt; // Getting the session 
&lt;BR /&gt; session = jsch.getSession(userID, host, 22); 
&lt;BR /&gt; 
&lt;BR /&gt; // Ignore HostKeyChecking 
&lt;BR /&gt; session.setConfig("StrictHostKeyChecking", "no"); 
&lt;BR /&gt; 
&lt;BR /&gt; // set the password for authentication 
&lt;BR /&gt; session.setPassword(password); 
&lt;BR /&gt; session.connect(); 
&lt;BR /&gt; 
&lt;BR /&gt; // Getting the channel using sftp 
&lt;BR /&gt; Channel channel = session.openChannel("sftp"); 
&lt;BR /&gt; channel.connect(); 
&lt;BR /&gt; 
&lt;BR /&gt; sftpChannel = (ChannelSftp) channel; 
&lt;BR /&gt; 
&lt;BR /&gt; // Going to folder 
&lt;BR /&gt; sftpChannel.cd("//"); 
&lt;BR /&gt; 
&lt;BR /&gt; // Perfrom the file operation using sftpChannel 
&lt;BR /&gt; sftpChannel.put("localfilename", "//!remotefilename"); 
&lt;BR /&gt; 
&lt;BR /&gt; } 
&lt;BR /&gt; catch (JSchException e ) 
&lt;BR /&gt; { 
&lt;BR /&gt; e.printStackTrace(); 
&lt;BR /&gt; } 
&lt;BR /&gt; catch (SftpException e) 
&lt;BR /&gt; { 
&lt;BR /&gt; e.printStackTrace(); 
&lt;BR /&gt; } 
&lt;BR /&gt; finally 
&lt;BR /&gt; { 
&lt;BR /&gt; // Exist the channel 
&lt;BR /&gt; sftpChannel.exit(); 
&lt;BR /&gt; 
&lt;BR /&gt; // Disconnect the session 
&lt;BR /&gt; session.disconnect(); 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt;When I execute it, 
&lt;BR /&gt;I am getting following error: 2 File not exist 
&lt;BR /&gt;Somehow it is not treating // as part of the arguments and keept taking them off. I have also tried //// in order to make program think that it is part of the argument but still no success. 
&lt;BR /&gt;Any idea how can I make sure that // are taken as part of argument and should not be deleted by program 
&lt;BR /&gt;Thanks in advance!</description>
    <pubDate>Thu, 03 Mar 2011 07:13:43 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2011-03-03T07:13:43Z</dc:date>
    <item>
      <title>tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372195#M135058</link>
      <description>These three things are causing an issue. I have a job that uses the tFtp component with sftp enabled. If I test it on any other site, it works fine, -IF- I include a remote directory. 
&lt;BR /&gt;However, for a site that I am trying to download files from, it does not have a remote directory, when I log in, it directly drops me in the directory where the files are located. So if I leave Remote Directory empty, or with a a space " ", or even "/" I get errors. For example, I left a space in remote directory and I got this error: 
&lt;BR /&gt;Exception in component tFTPGet_2 
&lt;BR /&gt;2: No such file: / /. 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1315) 
&lt;BR /&gt; at ftpservice.ftpget_0_2.FTPGet$1SFTPGetter_tFTPGet_2.getFiles(FTPGet.java:551) 
&lt;BR /&gt; at ftpservice.ftpget_0_2.FTPGet.tFTPGet_2Process(FTPGet.java:678) 
&lt;BR /&gt;I looked up and down jcraft.jsch but cannot find what is causing this issue. Like I said, I have another ftp site that includes all the parameters and it works fine...but when I need it for an ftp site that does not require a remote directory, I get all sorts of errors. 
&lt;BR /&gt;Could this be a bug? 
&lt;BR /&gt;thanks</description>
      <pubDate>Sat, 16 Nov 2024 13:32:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372195#M135058</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2024-11-16T13:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372196#M135059</link>
      <description>perhaps you can try "./" in remote directory ?</description>
      <pubDate>Tue, 16 Feb 2010 16:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372196#M135059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-16T16:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372197#M135060</link>
      <description>You can also try just the dot "." if "./" does not work</description>
      <pubDate>Tue, 16 Feb 2010 16:38:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372197#M135060</guid>
      <dc:creator>amounier</dc:creator>
      <dc:date>2010-02-16T16:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372198#M135061</link>
      <description>Well, I was able to contact the company hosting the FTP server and they are able to create a directory and drop the files there which solves my issue. 
&lt;BR /&gt;However, for future reference, I am going to try both of your replies: 
&lt;BR /&gt;If I put "./" this is the error: 
&lt;BR /&gt;Exception in component tFTPGet_2 
&lt;BR /&gt;3: Permission denied. 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2283) 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1737) 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1754) 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:780) 
&lt;BR /&gt; at ftpservice.ftpget_0_2.FTPGet$1SFTPGetter_tFTPGet_2.downloadFile(FTPGet.java:582) 
&lt;BR /&gt;If I put ".": 
&lt;BR /&gt;Exception in component tFTPGet_2 
&lt;BR /&gt;3: Permission denied. 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2283) 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1737) 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1754) 
&lt;BR /&gt; at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:780) 
&lt;BR /&gt; at ftpservice.ftpget_0_2.FTPGet$1SFTPGetter_tFTPGet_2.downloadFile(FTPGet.java:582) 
&lt;BR /&gt;I tried other combos like "/../" and "~/" and nothing works. 
&lt;BR /&gt;This seems to be an issue in the actual jsch library. It tries to change to the directory using "cd" and then it downloads the file using the absolute path. In reality, it should just use one or the other...not both. My issue would have been solved if that was the case. 
&lt;BR /&gt;To clarify, its not an issue with the server. They created an "outgoing" directory and I changed my remote directory to "/outgoing" and the job is now working fine.</description>
      <pubDate>Tue, 16 Feb 2010 19:24:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372198#M135061</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-02-16T19:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372199#M135062</link>
      <description>##########################################################&lt;BR /&gt;4: not supported to get directory /csptest&lt;BR /&gt;	at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:788)&lt;BR /&gt;	at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:750)&lt;BR /&gt;	at jschSftp.main(jschSftp.java:36)&lt;BR /&gt;###########################################################&lt;BR /&gt;Not able to copy directory how can i copy directory.</description>
      <pubDate>Fri, 18 Jun 2010 08:31:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372199#M135062</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-06-18T08:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372200#M135063</link>
      <description>ok i got the answer with 3 days/night hard work that its an error in their jar.I than used jsch 0.1.42 jar and got the function ChannelSftp.LsEntry which has function named getlongname and getfilename problm solved. U can contact me on csp.dhoom@gmail.com 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 21 Jun 2010 04:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372200#M135063</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-06-21T04:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372201#M135064</link>
      <description>hello,&lt;BR /&gt;can you tell me how you did?&lt;BR /&gt;thanks</description>
      <pubDate>Tue, 28 Sep 2010 16:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372201#M135064</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2010-09-28T16:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372202#M135065</link>
      <description>Can you please give an example how to use LsEntry.&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Wed, 02 Mar 2011 19:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372202#M135065</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2011-03-02T19:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372203#M135066</link>
      <description>I have requirement to ftp the file to server where put command should be similar to following: 
&lt;BR /&gt;&amp;gt;sftp user@hostaddress 
&lt;BR /&gt;&amp;gt;password 
&lt;BR /&gt;&amp;gt;cd // 
&lt;BR /&gt;&amp;gt;put localfilename //!remotefilename 
&lt;BR /&gt;Using ChannelSftp, I am having challenge to send the double-qoutes. 
&lt;BR /&gt;In my code, I pass the arguments as following: 
&lt;BR /&gt;JSch jsch = new JSch(); 
&lt;BR /&gt; 
&lt;BR /&gt;Session session = null; 
&lt;BR /&gt;ChannelSftp sftpChannel = null; 
&lt;BR /&gt; 
&lt;BR /&gt; try 
&lt;BR /&gt; { 
&lt;BR /&gt; // Getting the session 
&lt;BR /&gt; session = jsch.getSession(userID, host, 22); 
&lt;BR /&gt; 
&lt;BR /&gt; // Ignore HostKeyChecking 
&lt;BR /&gt; session.setConfig("StrictHostKeyChecking", "no"); 
&lt;BR /&gt; 
&lt;BR /&gt; // set the password for authentication 
&lt;BR /&gt; session.setPassword(password); 
&lt;BR /&gt; session.connect(); 
&lt;BR /&gt; 
&lt;BR /&gt; // Getting the channel using sftp 
&lt;BR /&gt; Channel channel = session.openChannel("sftp"); 
&lt;BR /&gt; channel.connect(); 
&lt;BR /&gt; 
&lt;BR /&gt; sftpChannel = (ChannelSftp) channel; 
&lt;BR /&gt; 
&lt;BR /&gt; // Going to folder 
&lt;BR /&gt; sftpChannel.cd("//"); 
&lt;BR /&gt; 
&lt;BR /&gt; // Perfrom the file operation using sftpChannel 
&lt;BR /&gt; sftpChannel.put("localfilename", "//!remotefilename"); 
&lt;BR /&gt; 
&lt;BR /&gt; } 
&lt;BR /&gt; catch (JSchException e ) 
&lt;BR /&gt; { 
&lt;BR /&gt; e.printStackTrace(); 
&lt;BR /&gt; } 
&lt;BR /&gt; catch (SftpException e) 
&lt;BR /&gt; { 
&lt;BR /&gt; e.printStackTrace(); 
&lt;BR /&gt; } 
&lt;BR /&gt; finally 
&lt;BR /&gt; { 
&lt;BR /&gt; // Exist the channel 
&lt;BR /&gt; sftpChannel.exit(); 
&lt;BR /&gt; 
&lt;BR /&gt; // Disconnect the session 
&lt;BR /&gt; session.disconnect(); 
&lt;BR /&gt; } 
&lt;BR /&gt; 
&lt;BR /&gt;When I execute it, 
&lt;BR /&gt;I am getting following error: 2 File not exist 
&lt;BR /&gt;Somehow it is not treating // as part of the arguments and keept taking them off. I have also tried //// in order to make program think that it is part of the argument but still no success. 
&lt;BR /&gt;Any idea how can I make sure that // are taken as part of argument and should not be deleted by program 
&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Thu, 03 Mar 2011 07:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372203#M135066</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2011-03-03T07:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: tFtp, sftp, and remote directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372204#M135067</link>
      <description>We are having a similar error with the Stat routine of jSch.&amp;nbsp; The file is consumed immediately upon upload so jsch cannot read the file to confirm it was uploaded.&amp;nbsp; Is there anyway to have Talend just put the file there without checking that it got there?</description>
      <pubDate>Fri, 13 Feb 2015 16:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFtp-sftp-and-remote-directory/m-p/2372204#M135067</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-02-13T16:02:51Z</dc:date>
    </item>
  </channel>
</rss>

