<?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 query. command line parameters. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069358#M140318</link>
    <description>I tried out the junk script on my educational D320 in the basement.  Worked great.&lt;BR /&gt;&lt;BR /&gt;I tried it out from a Windows ssh client on that same box and a Linux box running essentially the same release. &lt;BR /&gt;&lt;BR /&gt;Worked great.&lt;BR /&gt;&lt;BR /&gt;The actual production script with the problem executes like this.&lt;BR /&gt;&lt;BR /&gt;ssh -tv hostnname scriptname parm1 parm2&lt;BR /&gt;&lt;BR /&gt;Yet parm1 and parm2 do not show up in write statements at the top of the target script on the target host.&lt;BR /&gt;&lt;BR /&gt;As I said, I think the script is broke.  Perhaps the parameters are being nailed by some script stupidness on the server trying to execute the ssh.  &lt;BR /&gt;&lt;BR /&gt;I created the thread, because I honestly thought the command line parameters were not being passed.  Thats why I handed out a bunny to Jeff when he suggested the junk script.&lt;BR /&gt;&lt;BR /&gt;I thing the script running the ssh isn't loading the variables right and I can't post it because it tells a wee bit too much about our internal server structure(we are due to our work the target of frequent threats, though no successful hacks).&lt;BR /&gt;&lt;BR /&gt;So, its really in debug mode.&lt;BR /&gt;&lt;BR /&gt;Shridar, I always hand out a point or two, even when Harry posts in a joke.  Will you stop working on the problem if I give you points? That would be a shame.&lt;BR /&gt;&lt;BR /&gt;I'll ponder the question for a while.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Sun, 14 Sep 2003 21:36:41 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-09-14T21:36:41Z</dc:date>
    <item>
      <title>ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069350#M140310</link>
      <description>Two machines both 11.11 64 bit rp5450&lt;BR /&gt;&lt;BR /&gt;Public keys have been exchanged.&lt;BR /&gt;&lt;BR /&gt;I try this command line&lt;BR /&gt;&lt;BR /&gt;ssh -tv hostname command parameter1 parameter2&lt;BR /&gt;&lt;BR /&gt;ssh -tv hostname "command parameter1 parameter2"&lt;BR /&gt;&lt;BR /&gt;Same results with out the -tv&lt;BR /&gt;&lt;BR /&gt;The result is: paramete1 and parameter2 are not passed along with the command.&lt;BR /&gt;&lt;BR /&gt;The command is executed on the target system without parameters.  Echo statements in the target script show $1 and $2 have no value.&lt;BR /&gt;&lt;BR /&gt;I kind of need those parameters to pass through.&lt;BR /&gt;&lt;BR /&gt;Suggestions on how I should change my syntax that work are an easy rabbit.&lt;BR /&gt;&lt;BR /&gt;I now I can pass the parameters in a file and modify the target script to read that file and work, but I'm trying to learn something here.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Sep 2003 21:19:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069350#M140310</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-11T21:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069351#M140311</link>
      <description>I tested on my linux/unix machine on a command line and in a posix script.  Works fine for me.&lt;BR /&gt;&lt;BR /&gt;You must be using perl.  Try escape $. &lt;BR /&gt;</description>
      <pubDate>Thu, 11 Sep 2003 22:03:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069351#M140311</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2003-09-11T22:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069352#M140312</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;It works exactly for me on 11.11 systems.I wrote a small script that prints $1-$4.&lt;BR /&gt;&lt;BR /&gt;ssh -tv remote_host /tmp/junk.sh 1 2 3 4&lt;BR /&gt;&lt;BR /&gt;--trimmed--&lt;BR /&gt;debug1: Sending command: /tmp/jun.sh 1 2 3 4^M&lt;BR /&gt;debug1: channel request 0: exec^M&lt;BR /&gt;debug1: fd 4 setting TCP_NODELAY^M&lt;BR /&gt;debug1: channel 0: open confirm rwindow 0 rmax 32768^M&lt;BR /&gt;1^M&lt;BR /&gt;2^M&lt;BR /&gt;3^M&lt;BR /&gt;4^M&lt;BR /&gt;debug1: channel 0: rcvd eof^M&lt;BR /&gt;debug1: channel 0: output open -&amp;gt; drain^M&lt;BR /&gt;debug1: channel 0: obuf empty^M&lt;BR /&gt;--trimmed--&lt;BR /&gt;&lt;BR /&gt;Write your script junk.sh exactly like I did and try again. I don't know if it is the problem with your ssh itself.&lt;BR /&gt;&lt;BR /&gt;cat /tmp/junk.sh&lt;BR /&gt;echo $1&lt;BR /&gt;echo $2&lt;BR /&gt;echo $3&lt;BR /&gt;echo $4&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Sep 2003 22:24:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069352#M140312</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-09-11T22:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069353#M140313</link>
      <description>Interesting.&lt;BR /&gt;&lt;BR /&gt;Not using perl.&lt;BR /&gt;&lt;BR /&gt;I suppose leading me the right way is worth a rabbit too.&lt;BR /&gt;&lt;BR /&gt;I'm going to re-run in the morning and post up the debug information.  I'll also read it a bit more carefully.&lt;BR /&gt;&lt;BR /&gt;I will run a quickie test on my educational D320 and see what happens.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 11 Sep 2003 22:47:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069353#M140313</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-11T22:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069354#M140314</link>
      <description>Just ran a test on the educational D320.&lt;BR /&gt;&lt;BR /&gt;It worked just fine.&lt;BR /&gt;&lt;BR /&gt;Wondering if the target script is using korn shell if it makes a difference.&lt;BR /&gt;&lt;BR /&gt;I can't attach a log, because I can't capture a log.&lt;BR /&gt;&lt;BR /&gt;I'm so obsessive, its amazing.&lt;BR /&gt;&lt;BR /&gt;A simple test with junk.sh works, so it probably something about the target script thats broke.&lt;BR /&gt;&lt;BR /&gt;I think this situation requires more analysis.&lt;BR /&gt;&lt;BR /&gt;*** scratching my head and thinking.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 11 Sep 2003 23:23:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069354#M140314</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-11T23:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069355#M140315</link>
      <description>Obsessive's probably a good term - compulsive probably plays a part from time to time as well.&lt;BR /&gt;Realistically Steven, my friend, you should consider putting that devotion more towards those little ones &amp;amp; not us.&lt;BR /&gt;Believe me, we'll survive w/o your insight from time to time.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 12 Sep 2003 03:29:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069355#M140315</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-09-12T03:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069356#M140316</link>
      <description>You have me pegged Jeff.&lt;BR /&gt;&lt;BR /&gt;I actually was playing tunes with the kiddies at the 'puter while I was figuring this out.&lt;BR /&gt;&lt;BR /&gt;Obviously the script is broke.&lt;BR /&gt;&lt;BR /&gt;If someone can tell me how to collect that ssh data without cutting and pasting, that would be useful.&lt;BR /&gt;&lt;BR /&gt;I told a manager I could fix this on Friday.  I think I'm screwed.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 12 Sep 2003 04:02:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069356#M140316</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-12T04:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069357#M140317</link>
      <description>I didn't actually understand what you meant by "capturing the ssh data".&lt;BR /&gt;&lt;BR /&gt;I first made sure, ssh works without interaction. Then I ran&lt;BR /&gt;&lt;BR /&gt;ssh -tv remote_host /tmp/junk.sh 1 2 3 4 &amp;gt; /tmp/junkssh.out 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;Then I vi'ed /tmp/junkssh.out and pasted only the lines required here.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;PS: No points please.</description>
      <pubDate>Fri, 12 Sep 2003 23:36:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069357#M140317</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-09-12T23:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069358#M140318</link>
      <description>I tried out the junk script on my educational D320 in the basement.  Worked great.&lt;BR /&gt;&lt;BR /&gt;I tried it out from a Windows ssh client on that same box and a Linux box running essentially the same release. &lt;BR /&gt;&lt;BR /&gt;Worked great.&lt;BR /&gt;&lt;BR /&gt;The actual production script with the problem executes like this.&lt;BR /&gt;&lt;BR /&gt;ssh -tv hostnname scriptname parm1 parm2&lt;BR /&gt;&lt;BR /&gt;Yet parm1 and parm2 do not show up in write statements at the top of the target script on the target host.&lt;BR /&gt;&lt;BR /&gt;As I said, I think the script is broke.  Perhaps the parameters are being nailed by some script stupidness on the server trying to execute the ssh.  &lt;BR /&gt;&lt;BR /&gt;I created the thread, because I honestly thought the command line parameters were not being passed.  Thats why I handed out a bunny to Jeff when he suggested the junk script.&lt;BR /&gt;&lt;BR /&gt;I thing the script running the ssh isn't loading the variables right and I can't post it because it tells a wee bit too much about our internal server structure(we are due to our work the target of frequent threats, though no successful hacks).&lt;BR /&gt;&lt;BR /&gt;So, its really in debug mode.&lt;BR /&gt;&lt;BR /&gt;Shridar, I always hand out a point or two, even when Harry posts in a joke.  Will you stop working on the problem if I give you points? That would be a shame.&lt;BR /&gt;&lt;BR /&gt;I'll ponder the question for a while.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 14 Sep 2003 21:36:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069358#M140318</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-14T21:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069359#M140319</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;Unless you post your target script here, we are in a dead-lock situation as we already proved that it was not ssh that's causing the issue. I already posted my response of verifying it  by running the junk.sh script. That's why I insisted on not giving the points to the next post. I am a believer of points system and I limit that to only for quickly identifying the solution that fixed the member's problem. Rest is upto the member.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;PS: No points again. Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 04:56:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069359#M140319</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-09-15T04:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069360#M140320</link>
      <description>Slipped on that points assignment. Everyone that helps gets a few, though I cut down at Shridar's request.&lt;BR /&gt;&lt;BR /&gt;Shridar is right, though I would not use the term deadlock.  Its not ssh, or its configuration thats broken, its the script.  &lt;BR /&gt;&lt;BR /&gt;Consider this request on hold.  If I can't fix the script, I'll get permission from the powers that be and post it.&lt;BR /&gt;&lt;BR /&gt;ON HOLD......&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 15 Sep 2003 14:23:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069360#M140320</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-15T14:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: ssh query. command line parameters.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069361#M140321</link>
      <description>This issue is resolved.&lt;BR /&gt;&lt;BR /&gt;Thanks to all for their input.&lt;BR /&gt;&lt;BR /&gt;Here was the problem:&lt;BR /&gt;&lt;BR /&gt;The ssh from host1 to host2 did not have the proper user environment when it got to host2.&lt;BR /&gt;&lt;BR /&gt;A modification of the script on host2 to load the user environment wiped out the $1 and $2 variables.  This was probably the shift command. It wasn't worth modifying the profile load, 120 users need it anyway.&lt;BR /&gt;&lt;BR /&gt;So here was the fix.&lt;BR /&gt;&lt;BR /&gt;p1=$1&lt;BR /&gt;p2=$2&lt;BR /&gt;# load the user profile&lt;BR /&gt;# modify the rest of the script to use p1 and p2 instead of $1 and $2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This brings to light good scripting practices which are to get data out of $1 and $2 at the top of a shell script.&lt;BR /&gt;&lt;BR /&gt;Food for thought.&lt;BR /&gt;&lt;BR /&gt;I may still be giving lousy point free itrc answers today, but at least my #2 number one priority is in the can, fixed.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 19 Sep 2003 16:16:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-query-command-line-parameters/m-p/3069361#M140321</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-19T16:16:54Z</dc:date>
    </item>
  </channel>
</rss>

