<?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: X command SFTP SAS Issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765695#M242541</link>
    <description>Hi Tom,&lt;BR /&gt;&lt;BR /&gt;I tried to do that with FILENAME SFTP but I couldn't connect, that's why I tried that.&lt;BR /&gt;&lt;BR /&gt;In one line command have the same issue.&lt;BR /&gt;&lt;BR /&gt;SAS Documentation just make connections for read a file. Do you know how should I do this with FILENAME? (If is more easy than using x command or a script)...&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
    <pubDate>Thu, 02 Sep 2021 17:35:06 GMT</pubDate>
    <dc:creator>TesterSK</dc:creator>
    <dc:date>2021-09-02T17:35:06Z</dc:date>
    <item>
      <title>X command SFTP SAS Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765675#M242535</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue when I try to connect to a sftp server in SAS. I can connect to the sftp server in Linux without problems doing this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;su test
/*insert pass*/
cd /xxxx/sas/tmp/fort/files
sftp -oIdentityFile=/home/xxxx/.ssh/key_sftp xxxx_sftp@servergin01.western.world:/dpor/port/high/KBV
put /xxxx/sas/tmp/fort/files/google_01.html
put /xxxx/sas/tmp/fort/files/gwrwe_02.png
exit&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But If I execute this I can't see the new files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;x "su test";&lt;BR /&gt;x "/*insert pass*/";&lt;BR /&gt;x "cd /xxxx/sas/tmp/fort/files";
x "sftp -oIdentityFile=/home/xxxx/.ssh/key_sftp xxxx_sftp@servergin01.western.world:/dpor/port/high/KBV";
x "put /xxxx/sas/tmp/fort/files/google_01.html";
x "put /xxxx/sas/tmp/fort/files/google_01.png";
x "exit";&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to execute a mv command with SAS and works fine. Maybe SAS can't connect to the server?...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 16:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765675#M242535</guid>
      <dc:creator>TesterSK</dc:creator>
      <dc:date>2021-09-02T16:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: X command SFTP SAS Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765691#M242538</link>
      <description>&lt;P&gt;You cannot do it that way.&amp;nbsp; (You might not be able to do it at all if it requires you to pretend to be a live person and type a password).&amp;nbsp; Each X command is going to run in another unix shell instance. So the 'put" statement is not going to work because the new shell where it is running does not have the sftp command running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a shell script and use the X command to run the shell script.&lt;/P&gt;
&lt;P&gt;Use scp instead of sftp.&amp;nbsp; Use a separate scp&amp;nbsp;command to copy each file.&amp;nbsp; Then you are running just one the self contained command.&lt;/P&gt;
&lt;P&gt;If you really must use sudo to have access to read the files you want to transfer then I think you will have a big problem.&amp;nbsp; And if you don't need it then why did you include it?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 03:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765691#M242538</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-03T03:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: X command SFTP SAS Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765695#M242541</link>
      <description>Hi Tom,&lt;BR /&gt;&lt;BR /&gt;I tried to do that with FILENAME SFTP but I couldn't connect, that's why I tried that.&lt;BR /&gt;&lt;BR /&gt;In one line command have the same issue.&lt;BR /&gt;&lt;BR /&gt;SAS Documentation just make connections for read a file. Do you know how should I do this with FILENAME? (If is more easy than using x command or a script)...&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Thu, 02 Sep 2021 17:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765695#M242541</guid>
      <dc:creator>TesterSK</dc:creator>
      <dc:date>2021-09-02T17:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: X command SFTP SAS Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765779#M242582</link>
      <description>&lt;P&gt;Read&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;'s reply again. There's no mention of a filename.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 00:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-SFTP-SAS-Issue/m-p/765779#M242582</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-09-03T00:37:36Z</dc:date>
    </item>
  </channel>
</rss>

