<?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: Transfer text files from remote SFTP sever to local linux server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transfer-text-files-from-remote-SFTP-sever-to-local-linux-server/m-p/888510#M351036</link>
    <description>&lt;P&gt;Add "2&amp;gt;&amp;amp;1" to your commands, like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"sftp -i path of SSHKEY username@sftpserverdetail:/sftppath/file.csv /localpath/file.csv 2&amp;gt;&amp;amp;1"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will reroute stderr to stdout, so you can catch diagnostic messages in the DATA step. After that, run your code and read the log.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 07:34:58 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-08-09T07:34:58Z</dc:date>
    <item>
      <title>Transfer text files from remote SFTP sever to local linux server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transfer-text-files-from-remote-SFTP-sever-to-local-linux-server/m-p/888491#M351031</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am willing to transfer files from a remote SFTP server to local linux server and my command is below:&lt;/P&gt;
&lt;P&gt;Is there any problem with my code below as an example?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;method1:&lt;/P&gt;
&lt;P&gt;%let ftpcmd = "sftp -i path of SSHKEY username@sftpserverdetail:/sftppath/file.csv /localpath/file.csv";&lt;BR /&gt;filename ftppipe pipe &amp;amp;ftpcmd.;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;infile ftppipe;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;method2:&lt;/P&gt;
&lt;P&gt;%let ftpcmd = "scp username@sftpserverdetail:/remotesftppath/file.csv /localpath/file.csv";&lt;BR /&gt;filename ftppipe pipe &amp;amp;ftpcmd.;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;infile ftppipe;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 01:32:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transfer-text-files-from-remote-SFTP-sever-to-local-linux-server/m-p/888491#M351031</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2023-08-09T01:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer text files from remote SFTP sever to local linux server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transfer-text-files-from-remote-SFTP-sever-to-local-linux-server/m-p/888510#M351036</link>
      <description>&lt;P&gt;Add "2&amp;gt;&amp;amp;1" to your commands, like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"sftp -i path of SSHKEY username@sftpserverdetail:/sftppath/file.csv /localpath/file.csv 2&amp;gt;&amp;amp;1"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will reroute stderr to stdout, so you can catch diagnostic messages in the DATA step. After that, run your code and read the log.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 07:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transfer-text-files-from-remote-SFTP-sever-to-local-linux-server/m-p/888510#M351036</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-09T07:34:58Z</dc:date>
    </item>
  </channel>
</rss>

