<?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 ssh executing commands on a remote server. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085890#M441522</link>
    <description>Can anyone qive me the correct syntax to execute sql on a remote serveur using ssh.&lt;BR /&gt;&lt;BR /&gt;eg. ssh user@rserver "sql .." &lt;BR /&gt;&lt;BR /&gt;If I append the sql statement at the end of the .profile of the user@rserver, the sql works. Any other way, the command doesn't work.&lt;BR /&gt;&lt;BR /&gt;Jacques&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 28 Dec 2007 16:28:40 GMT</pubDate>
    <dc:creator>Jacques Carriere</dc:creator>
    <dc:date>2007-12-28T16:28:40Z</dc:date>
    <item>
      <title>ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085890#M441522</link>
      <description>Can anyone qive me the correct syntax to execute sql on a remote serveur using ssh.&lt;BR /&gt;&lt;BR /&gt;eg. ssh user@rserver "sql .." &lt;BR /&gt;&lt;BR /&gt;If I append the sql statement at the end of the .profile of the user@rserver, the sql works. Any other way, the command doesn't work.&lt;BR /&gt;&lt;BR /&gt;Jacques&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Dec 2007 16:28:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085890#M441522</guid>
      <dc:creator>Jacques Carriere</dc:creator>
      <dc:date>2007-12-28T16:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085891#M441523</link>
      <description>What error is returned when you run it using ssh user@rsever "sql ..."?&lt;BR /&gt;&lt;BR /&gt;Do you get the same results if using the -n option with ssh?&lt;BR /&gt;&lt;BR /&gt;ssh -n user@rserver "sql ..."&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-denver&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Dec 2007 16:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085891#M441523</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2007-12-28T16:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085892#M441524</link>
      <description>SQL over SSH isn't the best option I would say.&lt;BR /&gt;Better use something like the Perl DBI.&lt;BR /&gt;However, you could try something like this.&lt;BR /&gt;(note, providing SID's credentials like this is a very bad thing)&lt;BR /&gt;&lt;BR /&gt;$ ssh ruser@sqlserver ORACLE_SID=BLA ORACLE_HOME=/path/to/oracle/installation echo 'select foo from v$bar;' \| /path/to/sqlplus -S username/passwd</description>
      <pubDate>Fri, 28 Dec 2007 16:45:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085892#M441524</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-12-28T16:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085893#M441525</link>
      <description>note that the ssh man page states:&lt;BR /&gt;&lt;BR /&gt;If command is specified, it is executed on the remote host instead of a login shell.&lt;BR /&gt;&lt;BR /&gt;that implies (but I haven't verified) that the profile hasn't run, and that their isn't a shell running to interpret commands.&lt;BR /&gt;&lt;BR /&gt;put your sql in a script, make sure the environment is set the way you want and try running it with a full path to the script&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Dec 2007 16:50:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085893#M441525</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-12-28T16:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085894#M441526</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You may have a remote shell script that would actually run the SQL script. Use the following command to ssh&lt;BR /&gt;&lt;BR /&gt;output=`ssh user@remote_box /home/tom/run_dbscript.sh 2&amp;gt;/dev/null`&lt;BR /&gt;&lt;BR /&gt;Make sure that you have a SSH key defined in the remote server.&lt;BR /&gt;&lt;BR /&gt;Inside run_dbscript.sh you need to have logic for connecting to database and executing the SQL procedure.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Srikanth&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Dec 2007 16:50:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085894#M441526</guid>
      <dc:creator>Srikanth Arunachalam</dc:creator>
      <dc:date>2007-12-28T16:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085895#M441527</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You may have a remote shell script that would actually run the SQL script. Use the following command to ssh&lt;BR /&gt;&lt;BR /&gt;output=`ssh user@remote_box /home/tom/run_dbscript.sh 2&amp;gt;/dev/null`&lt;BR /&gt;&lt;BR /&gt;Make sure that you have a SSH key defined in the remote server.&lt;BR /&gt;&lt;BR /&gt;Inside run_dbscript.sh you need to have logic for connecting to database and executing the SQL procedure.&lt;BR /&gt;&lt;BR /&gt;sqlplus -s system/manager as sysdba &amp;lt;&amp;lt; EOF&lt;BR /&gt;set echo on feed off veri off pages 0 head off&lt;BR /&gt;select database_role from V$DATABASE;&lt;BR /&gt;exit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Srikanth&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Dec 2007 16:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085895#M441527</guid>
      <dc:creator>Srikanth Arunachalam</dc:creator>
      <dc:date>2007-12-28T16:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: ssh executing commands on a remote server.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085896#M441528</link>
      <description>problem solved</description>
      <pubDate>Fri, 28 Dec 2007 18:30:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-executing-commands-on-a-remote-server/m-p/5085896#M441528</guid>
      <dc:creator>Jacques Carriere</dc:creator>
      <dc:date>2007-12-28T18:30:13Z</dc:date>
    </item>
  </channel>
</rss>

