<?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: Help me: How to execute script  in a remote host in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000161#M424384</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;First of all, you have to provide rcp and remsh execution without a password request by editing ~opr/.rhosts on serverB and serverC (add ServerA hostname into the file).&lt;BR /&gt;Let's suppose that the script which updates the file called /apps/update.sh&lt;BR /&gt;#Copy a file "file_name" from ServerC to ServerA&lt;BR /&gt;rcp -p ServerC:/apps/file_name /apps/&lt;BR /&gt;#Update "file_name"&lt;BR /&gt;/apps/update.sh&lt;BR /&gt;# Copy file "file_name" from ServerA to ServerB&lt;BR /&gt;rcp -p /apps/file_name serverB:/apps/.&lt;BR /&gt;# Execute a script to update this file in ServerB&lt;BR /&gt;remsh serverB /apps/update.sh&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 30 Aug 2006 00:57:01 GMT</pubDate>
    <dc:creator>Victor Fridyev</dc:creator>
    <dc:date>2006-08-30T00:57:01Z</dc:date>
    <item>
      <title>Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000159#M424382</link>
      <description>Hi all&lt;BR /&gt;I am really stuck with this case:&lt;BR /&gt;I have three servers (HP-UX 11.i): ServerA, ServerB and ServerC&lt;BR /&gt;I have username "opr1" in all servers and I can login each other with rlogin.&lt;BR /&gt;&lt;BR /&gt;Now, from serverA (with "opr1" user)I want to make a script that copy a file from serverC to ServerA and then update that file. After that, copy that file from ServerA to ServerB and then execute a script to update this file again.&lt;BR /&gt;The script like:&lt;BR /&gt;&lt;BR /&gt;# Copy a file "file_name" from ServerC to ServerA&lt;BR /&gt;  rcp -p ServerC:/apps/file_name /apps/&lt;BR /&gt;  {&lt;BR /&gt;    Update "file_name"......&lt;BR /&gt;    ..........&lt;BR /&gt;    ..........&lt;BR /&gt;  }        &lt;BR /&gt;# Copy file "file_name" from ServerA to ServerB&lt;BR /&gt;&lt;BR /&gt;??????&lt;BR /&gt;??????&lt;BR /&gt;# Execute a script to update this file in ServerB&lt;BR /&gt;?????&lt;BR /&gt;?????&lt;BR /&gt;   &lt;BR /&gt;Please help me!&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Tue, 29 Aug 2006 22:48:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000159#M424382</guid>
      <dc:creator>Hoang Chi Cong_1</dc:creator>
      <dc:date>2006-08-29T22:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000160#M424383</link>
      <description>Hi Hoang,&lt;BR /&gt;&lt;BR /&gt;Update you /etc/hosts.equiv, and .rhosts files which will enable you to remote login and remote copy.&lt;BR /&gt;&lt;BR /&gt;Then remote copy the file using rcp&lt;BR /&gt;&lt;BR /&gt;change the directory to where you want to copy&lt;BR /&gt; &lt;BR /&gt;rcp â  p hostname:/path/filename  .&lt;BR /&gt;&lt;BR /&gt;edit the file&lt;BR /&gt;&lt;BR /&gt;then copy back to the other server&lt;BR /&gt;&lt;BR /&gt;rcp  filename  hostname:/path/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;IA&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Aug 2006 23:36:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000160#M424383</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2006-08-29T23:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000161#M424384</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;First of all, you have to provide rcp and remsh execution without a password request by editing ~opr/.rhosts on serverB and serverC (add ServerA hostname into the file).&lt;BR /&gt;Let's suppose that the script which updates the file called /apps/update.sh&lt;BR /&gt;#Copy a file "file_name" from ServerC to ServerA&lt;BR /&gt;rcp -p ServerC:/apps/file_name /apps/&lt;BR /&gt;#Update "file_name"&lt;BR /&gt;/apps/update.sh&lt;BR /&gt;# Copy file "file_name" from ServerA to ServerB&lt;BR /&gt;rcp -p /apps/file_name serverB:/apps/.&lt;BR /&gt;# Execute a script to update this file in ServerB&lt;BR /&gt;remsh serverB /apps/update.sh&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2006 00:57:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000161#M424384</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2006-08-30T00:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000162#M424385</link>
      <description>HI,&lt;BR /&gt;&lt;BR /&gt;implementation using ssh would be much simpler.&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Wed, 30 Aug 2006 03:46:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000162#M424385</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2006-08-30T03:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000163#M424386</link>
      <description>Thanks all for your replies...&lt;BR /&gt;&lt;BR /&gt;Now I want to execute a script in ServerB from ServerA.&lt;BR /&gt;I can use &lt;BR /&gt;&amp;lt;&amp;gt;remsh ServerB ls&lt;BR /&gt;&lt;BR /&gt;But I can not execute a script in ServerB from ServerA:&lt;BR /&gt;&amp;lt;&amp;gt;remsh ServerB /tmp/myscript.sh&lt;BR /&gt;The screen out put:&lt;BR /&gt;ksh: /tmp/myscript.sh:  not found&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Has any idea?&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2006 04:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000163#M424386</guid>
      <dc:creator>Hoang Chi Cong_1</dc:creator>
      <dc:date>2006-08-30T04:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000164#M424387</link>
      <description>Hi,&lt;BR /&gt;The script you to execute need to be in the server, that will be executed.&lt;BR /&gt;Put /tmp/myscript.sh in the ServerB, check that  have permissions to execute. If you can to that command without asking for password the schema it's the correct:&lt;BR /&gt;# rmsh ServerB date&lt;BR /&gt;or &lt;BR /&gt;# rmsh ServerB -l user date&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Joel&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2006 06:21:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000164#M424387</guid>
      <dc:creator>uadm26</dc:creator>
      <dc:date>2006-08-30T06:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000165#M424388</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you have to put the script first to this serverB:&lt;BR /&gt; &amp;lt;&amp;gt;rcp /apps/file_name ServerB:/tmp/myscript&lt;BR /&gt;Note, that there my be no execution bit set on this script, so better call the shell directly:&lt;BR /&gt; &amp;lt;&amp;gt;remsh ServerB sh /tmp/myscript.sh&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 30 Aug 2006 07:15:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000165#M424388</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-08-30T07:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000166#M424389</link>
      <description>Seem it works...&lt;BR /&gt;But there are some command (application command) in the script doens't work :-(&lt;BR /&gt;&lt;BR /&gt;It said: not found???&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2006 19:36:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000166#M424389</guid>
      <dc:creator>Hoang Chi Cong_1</dc:creator>
      <dc:date>2006-08-30T19:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000167#M424390</link>
      <description>If you are seeing "not found" then it means just what it says. The command is not in your PATH on the remote machine. This really means that if you are executing /xxx/yyy/zzz.sh on the remote machine then /xxx/yyy/zzz.sh needs to explicitly set and export any needed environment variables including PATH itself.&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2006 20:02:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000167#M424390</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-30T20:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000168#M424391</link>
      <description>Hm...I really forgot it...Yes...the PATH.&lt;BR /&gt;I will set now...&lt;BR /&gt;Thanks  A. Clay Stephenson.&lt;BR /&gt;Have a nice weekend :)</description>
      <pubDate>Wed, 30 Aug 2006 20:12:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000168#M424391</guid>
      <dc:creator>Hoang Chi Cong_1</dc:creator>
      <dc:date>2006-08-30T20:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help me: How to execute script  in a remote host</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000169#M424392</link>
      <description>Which hosts file did you update the sender or receiver or both?    JJ</description>
      <pubDate>Wed, 04 Apr 2007 13:02:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-me-how-to-execute-script-in-a-remote-host/m-p/5000169#M424392</guid>
      <dc:creator>Jerry Jesiolowski</dc:creator>
      <dc:date>2007-04-04T13:02:41Z</dc:date>
    </item>
  </channel>
</rss>

