<?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: how to perform a remote command with a parameter in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058465#M751222</link>
    <description>I think Massimo is right.&lt;BR /&gt;&lt;BR /&gt;ssh -f -T server1 "/sbin/init.d/logsurfer restart" &lt;BR /&gt;&lt;BR /&gt;See what happens.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Thu, 28 Aug 2003 10:35:23 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-08-28T10:35:23Z</dc:date>
    <item>
      <title>SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058455#M751211</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I make use of ssh since a couple of months.&lt;BR /&gt;Now we try to run the following command using ssh :&lt;BR /&gt;serverA # ssh -ttt server1 "/sbin/init.d/logsurfer restart"&lt;BR /&gt;&lt;BR /&gt;Now looking at server1 I can see the command comming in :&lt;BR /&gt;&lt;BR /&gt;sh -c /sbin/init.d/logsurfer restart&lt;BR /&gt;&lt;BR /&gt;Now it doesn't work, when I perform this command manualy it also doesn't work as it needs to be quoted :&lt;BR /&gt;&lt;BR /&gt;sh -c "/sbin/init.d/logsurfer restart"&lt;BR /&gt;&lt;BR /&gt;I tried several ways to get ssh report the command quoted to the remote machine, so as one command. Unfortunetly this never worked out. Anyone a suggestion ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regs David</description>
      <pubDate>Thu, 28 Aug 2003 06:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058455#M751211</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-28T06:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058456#M751212</link>
      <description>Ciao David,&lt;BR /&gt;&lt;BR /&gt;Try to run:&lt;BR /&gt;&lt;BR /&gt;ssh -ttt server1 "\"/sbin/init.d/logsurfer restart\""&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Simone</description>
      <pubDate>Thu, 28 Aug 2003 07:12:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058456#M751212</guid>
      <dc:creator>Simone Benzi_1</dc:creator>
      <dc:date>2003-08-28T07:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058457#M751213</link>
      <description>Hi Simone,&lt;BR /&gt;&lt;BR /&gt;Thanks for the input!&lt;BR /&gt;Unfortunetly I tried this as well, and please see the result. I can asure you this is the exact command !!&lt;BR /&gt;&lt;BR /&gt;Regs David&lt;BR /&gt;&lt;BR /&gt;# ssh -ttt server1 "\"/sbin/init.d/logsurfer restart\""    &lt;BR /&gt;sh: /sbin/init.d/logsurfer restart:  not found.&lt;BR /&gt;Connection to server1 closed.&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Aug 2003 07:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058457#M751213</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-28T07:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058458#M751214</link>
      <description>Ciao David,&lt;BR /&gt;&lt;BR /&gt;Is it possible for you to try the command with the ksh instead the sh?&lt;BR /&gt;&lt;BR /&gt;Simone</description>
      <pubDate>Thu, 28 Aug 2003 07:26:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058458#M751214</guid>
      <dc:creator>Simone Benzi_1</dc:creator>
      <dc:date>2003-08-28T07:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058459#M751215</link>
      <description>Nope, not possible. &lt;BR /&gt;I can give it a /bin/ksh previous to the command to perform, but it gives me, with or without quotes, the same errors.&lt;BR /&gt;Unfortunetly ssh invokes the sh -c on the remote system, so that will not be possible to change.&lt;BR /&gt;&lt;BR /&gt;Any other suggestions? :)&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Thu, 28 Aug 2003 08:46:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058459#M751215</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-28T08:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058460#M751216</link>
      <description>Hi,&lt;BR /&gt;the "not found" is because with the "" the command is interpreted as a whole command, not a command plus parameteres.&lt;BR /&gt;&lt;BR /&gt;Why do you repeat 3 times the -t (-ttt)?&lt;BR /&gt;&lt;BR /&gt;easy solution, but not nice: create two script that perform&lt;BR /&gt;"logsurfer stop" and "logsurfer start"&lt;BR /&gt;&lt;BR /&gt;nicer: tear away the "" :)&lt;BR /&gt;ssh -ttt server1 /sbin/init.d/logsurfer restart&lt;BR /&gt;&lt;BR /&gt;it works for me (besides -tt).&lt;BR /&gt;&lt;BR /&gt;    Massimo&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 28 Aug 2003 08:54:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058460#M751216</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-28T08:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058461#M751217</link>
      <description>No itent to hijack.&lt;BR /&gt;&lt;BR /&gt;I've seen a similar problem with ssh though, didn't realize this could be the cause.  ssh calls use the Posix Shell?&lt;BR /&gt;&lt;BR /&gt;-t says its to force psuedo terminal allocation.&lt;BR /&gt;&lt;BR /&gt;what about -T to force it not to do that.  Your script is a root startup script, it doesn't need a psuedo terminal.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 28 Aug 2003 09:33:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058461#M751217</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-08-28T09:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058462#M751218</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;I confirm, you must be good. But a restart now works, but I just never get back my prompt :(&lt;BR /&gt;&lt;BR /&gt;So initiating a :&lt;BR /&gt;&lt;BR /&gt;ssh -T server1 "/sbin/init.d/logsurfer restart"&lt;BR /&gt;&lt;BR /&gt;does restart logsurfer, but never gives back my # (prompt). Any ideas.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Thu, 28 Aug 2003 10:04:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058462#M751218</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-28T10:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058463#M751219</link>
      <description>I'd say lucky rather than good.&lt;BR /&gt;&lt;BR /&gt;man page has a few possible options for termination:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;      ~.   Disconnect&lt;BR /&gt;&lt;BR /&gt;      ~^Z  Background ssh&lt;BR /&gt;&lt;BR /&gt;      ~#   List forwarded connections&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can't say I know how to implement it.  This thread interests me because I have an ssh call core dumping right now and I need to figure out how to get it to use the Korn shell, because the app thats dumping needs that shell.&lt;BR /&gt;&lt;BR /&gt;If this finishes, post back the final resolution.&lt;BR /&gt;&lt;BR /&gt;sEP</description>
      <pubDate>Thu, 28 Aug 2003 10:11:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058463#M751219</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-08-28T10:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058464#M751220</link>
      <description>Try with&lt;BR /&gt;&lt;BR /&gt;ssh -f ...&lt;BR /&gt;&lt;BR /&gt;to send it to background, since you don't need a pty.&lt;BR /&gt;&lt;BR /&gt;  Massimo</description>
      <pubDate>Thu, 28 Aug 2003 10:27:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058464#M751220</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-28T10:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058465#M751222</link>
      <description>I think Massimo is right.&lt;BR /&gt;&lt;BR /&gt;ssh -f -T server1 "/sbin/init.d/logsurfer restart" &lt;BR /&gt;&lt;BR /&gt;See what happens.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 28 Aug 2003 10:35:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058465#M751222</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-08-28T10:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058466#M751224</link>
      <description>Ha, solution when perfoming this task in an automated job( so no chance to type interactivly ~. ~&amp;amp; or any other) :&lt;BR /&gt;&lt;BR /&gt;ssh -f -T server1 "/sbin/init.d/logsurfer restart"&lt;BR /&gt;&lt;BR /&gt;So, that's mine. Steve, you still should be able to do the following :&lt;BR /&gt;&lt;BR /&gt;ssh &lt;SERVER&gt; "/bin/ksh &lt;COMMAND&gt;"&lt;BR /&gt;&lt;BR /&gt;Maybe this can be your solution.&lt;BR /&gt;Thanks for your help in it !! If you have a core file you can send it to me and I'll try to analyze it. Just let me know if you need my help in it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regs David&lt;/COMMAND&gt;&lt;/SERVER&gt;</description>
      <pubDate>Thu, 28 Aug 2003 10:39:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058466#M751224</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-28T10:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: SSH: how to perform a remote command with a parameter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058467#M751226</link>
      <description>&lt;BR /&gt;We were all typing the same solution at the same time, so three people found the same solution. Who is giving me points :)&lt;BR /&gt;&lt;BR /&gt;For al other persons. Case closed, information shareable.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Thu, 28 Aug 2003 10:42:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-how-to-perform-a-remote-command-with-a-parameter/m-p/3058467#M751226</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-28T10:42:24Z</dc:date>
    </item>
  </channel>
</rss>

