<?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: ssh in X command in SAS code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277225#M55637</link>
    <description>&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Create-a-directory-on-UNIX/td-p/85207" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Create-a-directory-on-UNIX/td-p/85207&lt;/A&gt;</description>
    <pubDate>Tue, 14 Jun 2016 13:44:53 GMT</pubDate>
    <dc:creator>RahulG</dc:creator>
    <dc:date>2016-06-14T13:44:53Z</dc:date>
    <item>
      <title>ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277186#M55615</link>
      <description>&lt;P&gt;I am trying to use ssh unix command in X command in&amp;nbsp; a SAS code , but it is not working, ssh is not able to connect to rmeote server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x&amp;nbsp; 'ssh remote_server "cd dir1 ; mkdir abc"';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone could help would be great&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 11:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277186#M55615</guid>
      <dc:creator>devki</dc:creator>
      <dc:date>2016-06-14T11:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277194#M55622</link>
      <description>&lt;P&gt;Have you tried this at a shell prompt? The first test would be to execute this command on the machine where your SAS code runs and as the user that runs the code. If you can connect bu get prompts than deal with those first. SSH should not prompt for password, passphrase or display some logon banner text. Use of a SSH key is in order. Only then you can hope it will work from SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For further ideas I would like to see your error messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 12:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277194#M55622</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2016-06-14T12:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277196#M55624</link>
      <description>&lt;P&gt;And does it work when run directly in your operating system? &amp;nbsp;To be honest I don't see that command working as your not connected to anything or providing any connection details, but I am not a Unix user so don't know the application, but the examples I see online show:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ssh username@username.suso.org&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;as connection, then you pass other commands in. &amp;nbsp;The answer is anyways, get the commands working at the command prompt then copy them into your SAS program.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 12:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277196#M55624</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-14T12:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277207#M55627</link>
      <description>&lt;P&gt;Hi , I tried the ssh command on unix shell directly and it is working fine there , so this means I do have&amp;nbsp;a succesful&amp;nbsp;ssh set up but when i try the same command from SAS thru X , it does not work and in sas log it do not shows any ERROR messages too. Below is thecommand which i submitted on shell , apspt0152 is the remote server (password keys already set up) , and it is able to craete dir abc on apspt0152&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ssh apspt0152 "cd /aalfmodl/Devki ; mkdir abc"&lt;/P&gt;&lt;P&gt;*******************************************************************************&lt;/P&gt;&lt;P&gt;* *&lt;/P&gt;&lt;P&gt;* This is a private computer system containing confidential information. *&lt;/P&gt;&lt;P&gt;* Any unauthorized attempt to access or use this computer system or any *&lt;/P&gt;&lt;P&gt;* information on it by employees or other persons may result in termination *&lt;/P&gt;&lt;P&gt;* of employment, civil fines, and criminal penalties. This system must be *&lt;/P&gt;&lt;P&gt;* used for authorized business purposes only. *&lt;/P&gt;&lt;P&gt;* *&lt;/P&gt;&lt;P&gt;*******************************************************************************&lt;/P&gt;&lt;P&gt;!!! This system is configured with LDAP authentication !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 12:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277207#M55627</guid>
      <dc:creator>devki</dc:creator>
      <dc:date>2016-06-14T12:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277208#M55628</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using this command&amp;nbsp; where remote server is apspt0152 which is the actual hostname. the command is working fine at the shell but not is SAS code thru X&lt;/P&gt;&lt;P&gt;x 'ssh apspt0152 "cd /aalfmodl/Devki ; mkdir abc"';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 12:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277208#M55628</guid>
      <dc:creator>devki</dc:creator>
      <dc:date>2016-06-14T12:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277211#M55630</link>
      <description>&lt;P&gt;You might want to read in the OS output to a dataset to see the results:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filname abc pipe '&lt;SPAN&gt;ssh apspt0152 "cd /aalfmodl/Devki ; mkdir abc"';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;data temp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; length res $2000;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; infile abc dlm="¬";&lt;/P&gt;
&lt;P&gt;&amp;nbsp; input res $;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or simliar, you should then see the txt from the OS populated in a dataset. &amp;nbsp;I would guess that your SAS system doesn't have the priviledges needed, i.e. SAS might be installed on a server or something.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 12:57:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277211#M55630</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-14T12:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277212#M55631</link>
      <description>&lt;P&gt;Execute the operating system commands using a PIPE. Then you can read the messages that it sends.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile 'ssh remote_server "cd dir1 ; mkdir abc"' pipe;
  input;
  put _infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Most likely you have either entered the hostname or path names incorrectly. &amp;nbsp;But it might be that the process that is running your SAS program does not have permission to SSH to the remote or needs to supply a password.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 12:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277212#M55631</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-06-14T12:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277215#M55632</link>
      <description>Hi Tired this :&lt;BR /&gt;data _null_;&lt;BR /&gt;infile 'ssh apspt0152 "cd /aalfmodl/Devki; mkdir thrupipe"' pipe;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;and in the sas log :&lt;BR /&gt;NOTE: AUTOEXEC processing completed.&lt;BR /&gt;&lt;BR /&gt;1 data _null_;&lt;BR /&gt;2 infile 'ssh apspt0152 "cd /aalfmodl/Devki; mkdir thrupipe"' pipe;&lt;BR /&gt;3 input;&lt;BR /&gt;4 put _infile_;&lt;BR /&gt;5 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The infile 'ssh apspt0152 "cd /aalfmodl/Devki; mkdir thrupipe"' is:&lt;BR /&gt;Pipe command="ssh apspt0152 "cd /aalfmodl/Devki; mkdir thrupipe""&lt;BR /&gt;&lt;BR /&gt;Host key verification failed.&lt;BR /&gt;&amp;#12;2 The SAS System 08:00 Tuesday, June 14, 2016&lt;BR /&gt;&lt;BR /&gt;NOTE: 1 record was read from the infile 'ssh apspt0152 "cd /aalfmodl/Devki; mkdir thrupipe"'.&lt;BR /&gt;The minimum record length was 29.&lt;BR /&gt;The maximum record length was 29.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.36 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;I am not sure what does this means here "Host key verification failed. "</description>
      <pubDate>Tue, 14 Jun 2016 13:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277215#M55632</guid>
      <dc:creator>devki</dc:creator>
      <dc:date>2016-06-14T13:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277216#M55633</link>
      <description>&lt;P&gt;It means the place where the SAS program executes does not have the authentication to access the host. &amp;nbsp;Perhaps your SAS is on a network drive? &amp;nbsp;If so that network drive would need to have the host information setup on it. &amp;nbsp;Speak to your IT group, they will be able to do that.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 13:09:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277216#M55633</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-14T13:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277222#M55636</link>
      <description>&lt;P&gt;Why do you need to create this folder? Can you use dcreate() function if SAS can see the server?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 13:34:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277222#M55636</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-14T13:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277225#M55637</link>
      <description>&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Create-a-directory-on-UNIX/td-p/85207" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Create-a-directory-on-UNIX/td-p/85207&lt;/A&gt;</description>
      <pubDate>Tue, 14 Jun 2016 13:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277225#M55637</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-06-14T13:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277227#M55638</link>
      <description>Please see the below post. Similar thing done&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Create-a-directory-on-UNIX/td-p/85207" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Create-a-directory-on-UNIX/td-p/85207&lt;/A&gt;</description>
      <pubDate>Tue, 14 Jun 2016 13:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277227#M55638</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-06-14T13:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277506#M55737</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10079"&gt;@devki﻿&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few potential causes you may want to check:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Try adding the -o 'StrictHostKeyChecking=no' to the ssh command. Also add -o 'LogLevel quiet' to suppress the welcome banner&lt;/LI&gt;
&lt;LI&gt;Check to see if selinux, if enabled, is blocking you. I have seen this happening where on the shell it works and from scripting not:&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;grep AVC /var/log/audit/audit.log&lt;/PRE&gt;
&lt;P&gt;You may need to ask your sysadmin to help on this, especially to resolve it&amp;nbsp;if selinux is indeed at play. There are some sdelinux booleans that deterrmine how ssh behaves. Do this on the target server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Furthermore make absolutely certain that your SAS code executes on the same host and same user as your shell tests. The client/server approach of Enterprise Guide or any use of grid servers may make this actually fuzzy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards, Jan.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 08:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/277506#M55737</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2016-06-15T08:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/278326#M55990</link>
      <description>&lt;P&gt;Hi Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am a little out of my element here, but depending on your &amp;nbsp;access privileges you might try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; 'sudo ssh apspt0152 "cd /aalfmodl/Devki; mkdir thrupipe""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My understanding is that some commands require higher access priviledges and&amp;nbsp;the DBA can give you&amp;nbsp;'super user do" authority for certain unix commands.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However it will prompt for your password. I have used this with 'full' SAS, but Ihave my doubts that it will work with EG, UE or SAS Studio.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also you may need to know your 'lockdown' state.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 22:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/278326#M55990</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-06-17T22:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: ssh in X command in SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/278620#M56064</link>
      <description>The unicx ID which I was using did not had proper access to the SAS server , had to work with unix and IT admins for the same and then the pipe method using SSH command was working perfectly.. Thanks guyz for all the help ...</description>
      <pubDate>Mon, 20 Jun 2016 09:51:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ssh-in-X-command-in-SAS-code/m-p/278620#M56064</guid>
      <dc:creator>devki</dc:creator>
      <dc:date>2016-06-20T09:51:37Z</dc:date>
    </item>
  </channel>
</rss>

