<?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: Error connecting to FTP site in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276168#M311079</link>
    <description>&lt;P&gt;CoreFTP is Windows-only, so it seems your target system is Windows. You will need to use correct file syntax for this.&lt;/P&gt;
&lt;P&gt;But the kicker is that you specified port 22 (SSH) in a filename ftp. Omit specifying a port number so that SAS will use the correct port for FTP (21).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 07:33:30 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-06-09T07:33:30Z</dc:date>
    <item>
      <title>Error connecting to FTP site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276160#M311078</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to send a file to a customer via FTP - using 2 methods but both return errors. Please help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Method 1:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;filename infile '/sas/lsf/Cred/Test_File.xls';&lt;/P&gt;
&lt;P&gt;filename outdir ftp '/Data_Test' DIR FILEEXT&lt;BR /&gt; host="199.22.128.58"&lt;BR /&gt; user="tfgftp"&lt;BR /&gt; pass="abc123"&lt;BR /&gt; port=22;&lt;BR /&gt;/**********************************************************************/&lt;BR /&gt;data _null_;&lt;BR /&gt; infile infile truncover;&lt;BR /&gt; input;&lt;BR /&gt; file outdir(Test_File.xls);&lt;BR /&gt; put _infile_;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Log:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;NOTE: The infile INFILE is:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; Filename=/sas/lsf/Cred/Test_File.xls,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; Owner Name=darrylla,Group Name=sas,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; Access Permission=-rw-rw-r--,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; Last Modified=02Jun2016:13:40:05,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; File Size (bytes)=66048&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;NOTE: SSH-2.0-CoreFTP-0.3.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR: Invalid reply received from FTP server..&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;NOTE: 0 records were read from the infile INFILE.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;NOTE: DATA statement used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; real time 1:03.37&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; cpu time 0.01 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I resolve this error? &amp;nbsp;I can login to the FTP site using FileZilla (ftp client software) so the user login details are valid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Method 2:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Generating a sftp.cmd file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;curl -v -k --ftp-ssl-ccc -T /sas/lsf/Cred/Test_File.xls ftp://tfgftp:abc123@&lt;SPAN&gt;199.22.128.58&lt;/SPAN&gt;:22/Data_Test 2&amp;gt;&amp;amp;1 | tee /sas/lsf/Cred/Logs/sftp.log&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Log&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;NOTE: The infile DO_SFTP is:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; Pipe command="/sas/lsf/Credico/Logs/sftp.cmd"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;NOTE: 8 records were read from the infile DO_SFTP.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; The minimum record length was 22.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; The maximum record length was 5002.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;NOTE: DATA statement used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; real time 1:03.40&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt; cpu time 0.02 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;sftp logfile&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;* Trying &lt;SPAN&gt;199.22.128.58&lt;/SPAN&gt;...&lt;BR /&gt; % Total % Received % Xferd Average Speed Time Time Time Current&lt;BR /&gt; Dload Upload Total Spent Left Speed&lt;/P&gt;
&lt;P&gt;0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to &lt;SPAN&gt;199.22.128.58&lt;/SPAN&gt;(1&lt;SPAN&gt;99.22.128.58&lt;/SPAN&gt;) port 22 (#0)&lt;BR /&gt;&amp;lt; SSH-2.0-CoreFTP-0.3.3&lt;/P&gt;
&lt;P&gt;0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0&lt;BR /&gt; 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;writes out multiple lines untill the connection is closed.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;0 0 0 0 0 0 0 0 --:--:-- 0:01:01 --:--:-- 0&lt;BR /&gt; 0 0 0 0 0 0 0 0 --:--:-- 0:01:02 --:--:-- 0&lt;BR /&gt; 0 0 0 0 0 0 0 0 --:--:-- 0:01:03 --:--:-- 0* response reading failed&lt;BR /&gt;* Closing connection 0&lt;BR /&gt;curl: (56) response reading failed&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 06:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276160#M311078</guid>
      <dc:creator>DarrylLawrence</dc:creator>
      <dc:date>2016-06-09T06:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to FTP site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276168#M311079</link>
      <description>&lt;P&gt;CoreFTP is Windows-only, so it seems your target system is Windows. You will need to use correct file syntax for this.&lt;/P&gt;
&lt;P&gt;But the kicker is that you specified port 22 (SSH) in a filename ftp. Omit specifying a port number so that SAS will use the correct port for FTP (21).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 07:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276168#M311079</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-09T07:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to FTP site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276176#M311080</link>
      <description>&lt;P&gt;Thanks for the info Kurt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used the first option before for another project and it worked. ie copying a file from a Unix location to a FTP site. &amp;nbsp;The client has setup their ftp connection on port 22......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You mentioned CoreFTP. Do you have file syntax for this?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 08:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276176#M311080</guid>
      <dc:creator>DarrylLawrence</dc:creator>
      <dc:date>2016-06-09T08:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Error connecting to FTP site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276185#M311081</link>
      <description>&lt;P&gt;Regarding file syntax: since you have to deal with a Windows system, use C:\...\...\... instead of /.../.../...&lt;/P&gt;
&lt;P&gt;Unless CoreFTP is set up so that it can translate UNIX-style paths to something sensible within the Windows filesystem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I still state that port 22 is reserved for the Secure Shell protocol, and the FTP Access Method simply won't work.&lt;/P&gt;
&lt;P&gt;If someone else actually set up a standard (unencrypted, non-secure!) FTP server to run on port 22 (probably to trick their way around firewalls that only allow secure connections), their Information Security Officer should have a most severe talk with them &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 08:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-connecting-to-FTP-site/m-p/276185#M311081</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-09T08:33:42Z</dc:date>
    </item>
  </channel>
</rss>

