<?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: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405231#M98558</link>
    <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the insights and help.&amp;nbsp; I agree with your observation about security-aware applications.&amp;nbsp; I need this job to run batch.&amp;nbsp; When I omit the pw option, I get prompted by the shell to input a pw string, so this obviously is not the right behavior.&amp;nbsp; Below is my Linux session using sftp outside the SAS process:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ uname -a&lt;BR /&gt;Linux &lt;STRONG&gt;slrs01va6dmss01&lt;/STRONG&gt; 2.6.32-696.13.2.el6.x86_64 #1 SMP Fri Sep 22 12:32:14 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux&lt;BR /&gt;$&lt;BR /&gt;$ sftp 10.89.11.9&lt;BR /&gt;Connecting to 10.89.11.9...&lt;BR /&gt;sftp&amp;gt; cd jsn&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;Remote working directory: /home/DIR/thomas.betancourt/jsn&lt;BR /&gt;sftp&amp;gt; ! ls /home/DIR/thomas.betancourt/jsn&lt;BR /&gt;ls: cannot access /home/DIR/thomas.betancourt/jsn: No such file or directory&lt;BR /&gt;Shell exited with status 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the local server, the directory ~/jsn does not exist, is just to illustrate the sftp process is connecting to a remote server using passwordless ssh.&amp;nbsp; And obviously, there are no passphrase challenges here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One the SAS execution side, omitting the password string gets me further, as the log now contains a note indicating there is an attempt by the sftp sub-process from SAS to connect to the remote server.&amp;nbsp; The authentication failure is puzzling given the sftp process illustrated above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also altered the format for the user=string.&amp;nbsp; I was thinking that the sftp sub-process started from SAS may not like the the user-id convention used in this shop as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DIR\thomas.betancourt@slrs01va6f1clw5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insights are really apprecaited!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 filename out sftp "data.txt" debug&lt;BR /&gt;2 user = 'thomas.betancourt@slrs01va6flclw5'&lt;BR /&gt;3 /* options= 'pw&amp;nbsp; P@ssw0rd1"' */&lt;BR /&gt;4 host = '10.89.11.9'&lt;BR /&gt;5 cd = '/home/DIR/thomas.betancourt/jsn'&lt;BR /&gt;6 recfm = v;&lt;BR /&gt;7&lt;BR /&gt;8 data _null_;&lt;BR /&gt;9 set sashelp.class;&lt;BR /&gt;10 file out;&lt;BR /&gt;11 put _all_;&lt;BR /&gt;12 run;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: Connecting to 10.89.11.9...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: Received disconnect from 10.89.11.9: 2: Too many authentication failures&lt;/STRONG&gt;&lt;BR /&gt;for thomas.betancourt@slrs01va6flclw5&lt;/P&gt;&lt;P&gt;NOTE: The file OUT is:&lt;BR /&gt;Filename=data.txt&lt;/P&gt;&lt;P&gt;NOTE: put "/tmp/SAS_work309500003AA1_slrs01va6dmss01/#LN00010" data.txt&lt;/P&gt;&lt;P&gt;ERROR: Directory or file data.txt doesn't exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2017 14:32:07 GMT</pubDate>
    <dc:creator>rbetancourt</dc:creator>
    <dc:date>2017-10-18T14:32:07Z</dc:date>
    <item>
      <title>FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/404917#M98441</link>
      <description>&lt;P&gt;I want to use the SAS 9.4 FILENAME SFTP access method between 2 Linux servers (local and remote) to read SASHELP.class on the local server and write this dataset as a text file on the remote server.&amp;nbsp; I have tested this without having SAS execute the program below.&amp;nbsp; From the local server, I can SFTP to the remote server to GET and PUT text files between the two servers.&amp;nbsp; With the SAS program, I have also checked permissions in the remote environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: AUTOEXEC processing completed.&lt;/P&gt;&lt;P&gt;1 filename out sftp "data.txt" debug&lt;BR /&gt;2 user = 'DIR\thomas.betancourt'&lt;BR /&gt;3 options= 'pw "P@ssword1"'&lt;BR /&gt;4 host = '10.89.11.9'&lt;BR /&gt;5 cd = '/home/DIR/thomas.betancourt/jsn'&lt;BR /&gt;6 recfm = v;&lt;BR /&gt;7&lt;BR /&gt;8 data _null_;&lt;BR /&gt;9 set sashelp.class;&lt;BR /&gt;10 file out;&lt;BR /&gt;11 put _all_;&lt;BR /&gt;12 run;&lt;/P&gt;&lt;P&gt;NOTE: usage: sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config]&lt;/P&gt;&lt;P&gt;[-o ssh_option] [-P sftp_server_path] [-R num_requests]&lt;/P&gt;&lt;P&gt;[-S program] [-s subsystem | sftp_server] host&lt;BR /&gt;sftp&lt;BR /&gt;[user@]host[:file ...]&lt;BR /&gt;sftp [user@]host[:dir[/]]&lt;BR /&gt;sftp -b&lt;BR /&gt;batchfile [user@]host&lt;/P&gt;&lt;P&gt;NOTE: cd /home/DIR/thomas.betancourt/jsn&lt;/P&gt;&lt;P&gt;ERROR: Directory or file data.txt doesn't exist.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 1.50 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ERROR: Errors printed on page 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice on line 5, the cd command is honored as indicated by the NOTE in the SAS log.&amp;nbsp; I've run out of ideas, and yet, this should be a rather straight-forward exercise &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insights are appreciated.&amp;nbsp; Thanks,&lt;/P&gt;&lt;P&gt;Randy Betancourt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 18:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/404917#M98441</guid>
      <dc:creator>rbetancourt</dc:creator>
      <dc:date>2017-10-17T18:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/404941#M98452</link>
      <description>&lt;P&gt;Since the external sftp won't even start (this causes the "usage" note), nothing will work. Have you set up passwordless authentication (public/private key) for the user?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 19:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/404941#M98452</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-17T19:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405025#M98491</link>
      <description>&lt;P&gt;This the part where i am not clear from the doc.&amp;nbsp; I am pretty sure SAS starts the STFP sub-process, evidenced by the request to change directory request being successful from the SAS log.&amp;nbsp; Without the use of SAS, the first time I executed SFTP between these 2 servers, I received the yes/no prompt to create the RSA keys.&amp;nbsp; I've verified that the .ssh/know_hosts files contain the RSA keys on the local server that identifies the remote server as a known host.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 21:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405025#M98491</guid>
      <dc:creator>rbetancourt</dc:creator>
      <dc:date>2017-10-17T21:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405103#M98515</link>
      <description>&lt;P&gt;Did you have to enter a password?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 04:49:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405103#M98515</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-18T04:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405112#M98519</link>
      <description>&lt;P&gt;Actually, SAS couldn't start your sftp correctly. What you see in the log is the typical output you get when you call sftp with incorrect commandline parameters:&lt;/P&gt;
&lt;PRE&gt;$ sftp -garbage
sftp: illegal option -- g
usage: sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
          [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
          [-o ssh_option] [-P port] [-R num_requests] [-S program]
          [-s subsystem | sftp_server] host
       sftp [user@]host[:file ...]
       sftp [user@]host[:dir[/]]
       sftp -b batchfile [user@]host
&lt;/PRE&gt;
&lt;P&gt;This is the output of an invalid sftp call on our AIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your next note&lt;/P&gt;
&lt;PRE&gt;NOTE: cd /home/DIR/thomas.betancourt/jsn
&lt;/PRE&gt;
&lt;P&gt;might come from the fact that the cd is not submitted to the sftp, but locally to the shell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess that this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options= 'pw "P@ssword1"'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is the reason for your troubles, as this option is not recognized by the sftp command, and should not be there at all. As I already said, SAS requires that a passwordless connection is set up with sftp/ssh. Verify this by doing&lt;/P&gt;
&lt;PRE&gt;sftp user@host&lt;/PRE&gt;
&lt;P&gt;from the commandline. You should immediately get a connection without any further input required. If not, you have to set up public/private key authentication.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 06:40:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405112#M98519</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-18T06:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405113#M98520</link>
      <description>&lt;P&gt;PS Note that no security-aware application allows passing passwords on the commandline, as commandlines can easily be retrieved on servers by displaying the process status (ps -f on UNIX). That's why sftp does not have a pw option.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 06:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405113#M98520</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-18T06:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405231#M98558</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the insights and help.&amp;nbsp; I agree with your observation about security-aware applications.&amp;nbsp; I need this job to run batch.&amp;nbsp; When I omit the pw option, I get prompted by the shell to input a pw string, so this obviously is not the right behavior.&amp;nbsp; Below is my Linux session using sftp outside the SAS process:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ uname -a&lt;BR /&gt;Linux &lt;STRONG&gt;slrs01va6dmss01&lt;/STRONG&gt; 2.6.32-696.13.2.el6.x86_64 #1 SMP Fri Sep 22 12:32:14 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux&lt;BR /&gt;$&lt;BR /&gt;$ sftp 10.89.11.9&lt;BR /&gt;Connecting to 10.89.11.9...&lt;BR /&gt;sftp&amp;gt; cd jsn&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;Remote working directory: /home/DIR/thomas.betancourt/jsn&lt;BR /&gt;sftp&amp;gt; ! ls /home/DIR/thomas.betancourt/jsn&lt;BR /&gt;ls: cannot access /home/DIR/thomas.betancourt/jsn: No such file or directory&lt;BR /&gt;Shell exited with status 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the local server, the directory ~/jsn does not exist, is just to illustrate the sftp process is connecting to a remote server using passwordless ssh.&amp;nbsp; And obviously, there are no passphrase challenges here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One the SAS execution side, omitting the password string gets me further, as the log now contains a note indicating there is an attempt by the sftp sub-process from SAS to connect to the remote server.&amp;nbsp; The authentication failure is puzzling given the sftp process illustrated above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also altered the format for the user=string.&amp;nbsp; I was thinking that the sftp sub-process started from SAS may not like the the user-id convention used in this shop as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DIR\thomas.betancourt@slrs01va6f1clw5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insights are really apprecaited!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 filename out sftp "data.txt" debug&lt;BR /&gt;2 user = 'thomas.betancourt@slrs01va6flclw5'&lt;BR /&gt;3 /* options= 'pw&amp;nbsp; P@ssw0rd1"' */&lt;BR /&gt;4 host = '10.89.11.9'&lt;BR /&gt;5 cd = '/home/DIR/thomas.betancourt/jsn'&lt;BR /&gt;6 recfm = v;&lt;BR /&gt;7&lt;BR /&gt;8 data _null_;&lt;BR /&gt;9 set sashelp.class;&lt;BR /&gt;10 file out;&lt;BR /&gt;11 put _all_;&lt;BR /&gt;12 run;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: Connecting to 10.89.11.9...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: Received disconnect from 10.89.11.9: 2: Too many authentication failures&lt;/STRONG&gt;&lt;BR /&gt;for thomas.betancourt@slrs01va6flclw5&lt;/P&gt;&lt;P&gt;NOTE: The file OUT is:&lt;BR /&gt;Filename=data.txt&lt;/P&gt;&lt;P&gt;NOTE: put "/tmp/SAS_work309500003AA1_slrs01va6dmss01/#LN00010" data.txt&lt;/P&gt;&lt;P&gt;ERROR: Directory or file data.txt doesn't exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 14:32:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405231#M98558</guid>
      <dc:creator>rbetancourt</dc:creator>
      <dc:date>2017-10-18T14:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405433#M98636</link>
      <description>&lt;P&gt;When you do a simple&lt;/P&gt;
&lt;PRE&gt;sftp hostname&lt;/PRE&gt;
&lt;P&gt;sftp will use your current user-id for authentication on the remote server.&lt;/P&gt;
&lt;P&gt;The syntax for using &lt;EM&gt;another&lt;/EM&gt; user (or any user/hostname combination) is&lt;/P&gt;
&lt;PRE&gt;sftp user@hostname&lt;/PRE&gt;
&lt;P&gt;so I would reduce the filename statement to the bare necessities:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename out sftp "data.txt"
  debug
  user = 'thomas.betancourt'
  host = '10.89.11.9'
  cd = '/home/DIR/thomas.betancourt/jsn'
  recfm = v
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as this will transIate to&lt;/P&gt;
&lt;PRE&gt;sftp thomas.betancourt@10.89.11.9&lt;/PRE&gt;
&lt;P&gt;I also suggest using the domain name of the host instead of the IP address, to avoid maintainance when the server is moved in the network.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 07:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405433#M98636</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-19T07:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405528#M98669</link>
      <description>&lt;P&gt;You will most likely need to create a key file. You can use the -o option that you see in the error message to pass in the IndentityFile option that points to the key file.&amp;nbsp; Try it first from the command line.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;sftp -oIdentityFile=~/.ssh/mykey.txt 'DIR\thomas.betancourt'@10.89.11.9&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see if you can connect to the remote host without it prompting for a password.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 13:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405528#M98669</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-10-19T13:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405533#M98670</link>
      <description>&lt;P&gt;Your solution to stripping down the FILENAME statement to the bare minimum is the correct answer!&amp;nbsp; At:&lt;/P&gt;&lt;P&gt;&lt;A href="http://go.documentation.sas.com/?docsetId=lestmtsglobal&amp;amp;docsetTarget=p0xln1fiwsr340n1xxf4mkmfxp6f.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=lestmtsglobal&amp;amp;docsetTarget=p0xln1fiwsr340n1xxf4mkmfxp6f.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for the FILENAME statement states for the user= option syntax:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;username&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is not typically required on LINUX or UNIX hosts when using public key authentication.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 filename out sftp "data.txt" debug&lt;BR /&gt;2 host = '10.89.11.9'&lt;BR /&gt;3 cd = '/home/DIR/thomas.betancourt/jsn'&lt;BR /&gt;4 recfm = v;&lt;BR /&gt;5&lt;BR /&gt;6 data _null_;&lt;BR /&gt;7 set sashelp.class;&lt;BR /&gt;8 file out;&lt;BR /&gt;9 put _all_;&lt;BR /&gt;10 run;&lt;/P&gt;&lt;P&gt;NOTE: Connecting to 10.89.11.9...&lt;/P&gt;&lt;P&gt;NOTE: sftp&amp;gt; cd /home/DIR/thomas.betancourt/jsn&lt;/P&gt;&lt;P&gt;NOTE: The file OUT is:&lt;BR /&gt;Filename=data.txt&lt;/P&gt;&lt;P&gt;NOTE: sftp&amp;gt; put "/tmp/SAS_work9D860000500A_slrs01va6dmss01/#LN00010"&lt;BR /&gt;data.txt&lt;BR /&gt;Uploading /tmp/SAS_work9D860000500A_slrs01va6dmss01/#LN00010 to&lt;BR /&gt;/home/DIR/thomas.betancourt/jsn/data.txt&lt;/P&gt;&lt;P&gt;NOTE: 19 records were written to the file OUT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just goes to show how the adage, "less is more" is very often true,&amp;nbsp; I really appreciate your help here!&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 13:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405533#M98670</guid>
      <dc:creator>rbetancourt</dc:creator>
      <dc:date>2017-10-19T13:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: FILENAME SFTP access method ERROR: Directory or file data.txt doesn't exist</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405541#M98672</link>
      <description>&lt;P&gt;We do use the user= option, because we solve several problems in one step&lt;/P&gt;
&lt;P&gt;- the userid used by the scheduler is the same on the production DB and on the SAS server&lt;/P&gt;
&lt;P&gt;- we do not want our SAS batch jobs to be able to write to the production DB, so connecting with same userid is out of the question&lt;/P&gt;
&lt;P&gt;- we want several developers on SAS to be able to have the same read access to the DB server, for development and testing&lt;/P&gt;
&lt;P&gt;so we have a dedicated "SAS user" that is used by the scheduler user and the developers when connecting to the DB server; all those users have the same entries in the id_rsa files in their .ssh directory that correspond to the id_rsa.pub on the server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad I could be of help.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 14:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FILENAME-SFTP-access-method-ERROR-Directory-or-file-data-txt/m-p/405541#M98672</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-19T14:04:52Z</dc:date>
    </item>
  </channel>
</rss>

