<?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: running remsh with su in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787022#M784100</link>
    <description>Warren,&lt;BR /&gt;-l username does not work for other than root user.&lt;BR /&gt;&lt;BR /&gt;Get error: remshd: Login Incorrect.&lt;BR /&gt;&lt;BR /&gt;Jakes, still trying to figure yours out. Not sure it applies in my case but will do some testing anyway.</description>
    <pubDate>Fri, 12 May 2006 05:08:40 GMT</pubDate>
    <dc:creator>Safdar Mustafa</dc:creator>
    <dc:date>2006-05-12T05:08:40Z</dc:date>
    <item>
      <title>running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787015#M784093</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying ro run a command from server1 to remotely execute on server2. However, the command requires the following:&lt;BR /&gt;&lt;BR /&gt;su diff-user&lt;BR /&gt;csh&lt;BR /&gt;source /etc/example.cshrc&lt;BR /&gt;./run-command-in-script&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a simple way to do this?&lt;BR /&gt;&lt;BR /&gt;So far I have unsuccessfully tried:&lt;BR /&gt;&lt;BR /&gt;server1(root)# remsh server2 su diff-user -c "csh /path/run-command-in-script"&lt;BR /&gt;&lt;BR /&gt;....failed miserably :-)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 04:08:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787015#M784093</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T04:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787016#M784094</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;u don't need to use su, you can remsh to other user.&lt;BR /&gt;&lt;BR /&gt;# remsh host [-l username] command&lt;BR /&gt;&lt;BR /&gt;GOOD LUCK!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 04:12:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787016#M784094</guid>
      <dc:creator>Warren_9</dc:creator>
      <dc:date>2006-05-12T04:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787017#M784095</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would enable a passwordless connection from root@server1 to diffuser@server2:&lt;BR /&gt;(as diffuser@server2): echo server1 root &amp;gt;&amp;gt;~/.rhosts&lt;BR /&gt;&lt;BR /&gt;and then (as root@server1) use&lt;BR /&gt;remsh diffusr@server2 "csh -c 'source /etc/example.cshrc; ./run-command-in-script'"&lt;BR /&gt;&lt;BR /&gt;to connect to server2.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 04:20:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787017#M784095</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-05-12T04:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787018#M784096</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What about this script in remote server &lt;BR /&gt;&lt;BR /&gt;as /tmp/test.sh&lt;BR /&gt;su diff-user&lt;BR /&gt;csh&lt;BR /&gt;source /etc/example.cshrc&lt;BR /&gt;./run-command-in-script&lt;BR /&gt;&lt;BR /&gt;You run just&lt;BR /&gt;remsh server2 /tmp/test.sh&lt;BR /&gt;&lt;BR /&gt;Chan&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 04:31:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787018#M784096</guid>
      <dc:creator>Chan 007</dc:creator>
      <dc:date>2006-05-12T04:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787019#M784097</link>
      <description>Sorry, no simple way...&lt;BR /&gt;If you want to execute something under diffuser@server2, then a trusted relationship of some kind is required.&lt;BR /&gt;That means either remsh or ssh.&lt;BR /&gt;&lt;BR /&gt;However: have you tried putting your su in a script and executing the script?&lt;BR /&gt;&lt;BR /&gt;# echo "su diff-user -c 'csh /path/run-command-in-script'" &amp;gt; local_dir/scriptname&lt;BR /&gt;# chmod 750 scriptname&lt;BR /&gt;# rcp local_dir/scriptname server2:~/scriptname&lt;BR /&gt;# remsh server2 scriptname&lt;BR /&gt;&lt;BR /&gt;Might work?&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 04:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787019#M784097</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2006-05-12T04:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787020#M784098</link>
      <description>Peter, &lt;BR /&gt;&lt;BR /&gt;remsh diffusr@server2 cmd&lt;BR /&gt;does not work, my .rhosts is set ok with passwordless connection (works ok with remsh server2 cmd) - but is does not like diffuser?server2.&lt;BR /&gt;Gives: rcmd: diffuser@server2: Unknown host&lt;BR /&gt;&lt;BR /&gt;Chan, &lt;BR /&gt;Tried script previously but su diffuser line terminates the script because it switches user and cannot continue the script. That's why I am looking for maybe a one-liner.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 04:50:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787020#M784098</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T04:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787021#M784099</link>
      <description>An amendment to my previous post:&lt;BR /&gt;&lt;BR /&gt;echo "su - diffuser -c ......"</description>
      <pubDate>Fri, 12 May 2006 04:55:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787021#M784099</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2006-05-12T04:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787022#M784100</link>
      <description>Warren,&lt;BR /&gt;-l username does not work for other than root user.&lt;BR /&gt;&lt;BR /&gt;Get error: remshd: Login Incorrect.&lt;BR /&gt;&lt;BR /&gt;Jakes, still trying to figure yours out. Not sure it applies in my case but will do some testing anyway.</description>
      <pubDate>Fri, 12 May 2006 05:08:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787022#M784100</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T05:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787023#M784101</link>
      <description>try &lt;BR /&gt;remsh server2 -n "your commands"&lt;BR /&gt;&lt;BR /&gt;Chan</description>
      <pubDate>Fri, 12 May 2006 05:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787023#M784101</guid>
      <dc:creator>Chan 007</dc:creator>
      <dc:date>2006-05-12T05:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787024#M784102</link>
      <description>Safdar, the idea is to encapsulate your su call INSIDE a script, then execute that script as a single call.&lt;BR /&gt;Here's the steps:&lt;BR /&gt;1) Put the call to "su" inside a script on the local server (my echo statement)&lt;BR /&gt;2) change the permissions on the local file (chmod ....)&lt;BR /&gt;3) remote copy the file (which preserves the chmod settings) to root on that side (rcp ....)&lt;BR /&gt;4) use remsh to execute this script, which then does an "su - diffuser -c ...." (remsh server2 script)&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2006 05:19:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787024#M784102</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2006-05-12T05:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787025#M784103</link>
      <description>Thanks Jakes,&lt;BR /&gt;I definately see where your coming from, and this is what I have been trying for a while, however I cannot get the script to work on the local server even. In theory it should work, but its failing. Quite annoying since its quite a basic thing to do :-)&lt;BR /&gt;&lt;BR /&gt;Will keep debugging.</description>
      <pubDate>Fri, 12 May 2006 05:53:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787025#M784103</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T05:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787026#M784104</link>
      <description>Alhumdulillah!!!&lt;BR /&gt;&lt;BR /&gt;I cracked it... /etc/hosts.equiv made the difference I think. The following now works:&lt;BR /&gt;&lt;BR /&gt;server1: remsh server2 -l diffuser "csh -c 'source /etc/xxxx.cshrc'; /myscript"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks all you guys for you help.&lt;BR /&gt;&lt;BR /&gt;Safdar</description>
      <pubDate>Fri, 12 May 2006 06:07:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787026#M784104</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T06:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787027#M784105</link>
      <description>Hi,&lt;BR /&gt;you can try to write the script in this form:&lt;BR /&gt;&lt;BR /&gt;su - diff-user &amp;lt;&amp;lt; EOF&lt;BR /&gt;&lt;BR /&gt;command1&lt;BR /&gt;command2&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;and remsh it&lt;BR /&gt;&lt;BR /&gt;Enrico</description>
      <pubDate>Fri, 12 May 2006 06:08:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787027#M784105</guid>
      <dc:creator>Enrico P.</dc:creator>
      <dc:date>2006-05-12T06:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787028#M784106</link>
      <description>hey, you da man...&lt;BR /&gt;&lt;BR /&gt;That looks to be the best working solution for all in one script. Reduces user error on running from command line.&lt;BR /&gt;&lt;BR /&gt;Thanks 10/10!!&lt;BR /&gt;&lt;BR /&gt;Safdar</description>
      <pubDate>Fri, 12 May 2006 08:28:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787028#M784106</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T08:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787029#M784107</link>
      <description>..the last message was meant for Enrico..</description>
      <pubDate>Fri, 12 May 2006 08:30:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787029#M784107</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T08:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787030#M784108</link>
      <description>Hi Safdar,&lt;BR /&gt;&lt;BR /&gt;Not to scold but you *really* should be using ssh for this.&lt;BR /&gt;remsh is extremely insecure - I could run ethereal or tcpdump &amp;amp; get your PW or compromise your .netrc file as well.&lt;BR /&gt;You'll fail ANY SOX audit if you're using remsh.&lt;BR /&gt;It's *so* 90s :~()&lt;BR /&gt;&lt;BR /&gt;My $0.02,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 12 May 2006 08:37:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787030#M784108</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2006-05-12T08:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787031#M784109</link>
      <description>Hi Jeff,&lt;BR /&gt;&lt;BR /&gt;Thannks for the advice, but I don't seem to have ssh on my servers running 11.11.&lt;BR /&gt;&lt;BR /&gt;#ssh server2&lt;BR /&gt;sh: ssh:  not found.&lt;BR /&gt;#ksh&lt;BR /&gt;#ssh server2&lt;BR /&gt;ksh: ssh:  not found&lt;BR /&gt;#man ssh&lt;BR /&gt;No manual entry for ssh.&lt;BR /&gt;&lt;BR /&gt;how do I get it working...?</description>
      <pubDate>Fri, 12 May 2006 08:52:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787031#M784109</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T08:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787032#M784110</link>
      <description>Hi (again) Safdar,&lt;BR /&gt;&lt;BR /&gt;The product number is T1471AA &amp;amp; it's available for free here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA" target="_blank"&gt;http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 12 May 2006 09:03:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787032#M784110</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2006-05-12T09:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787033#M784111</link>
      <description>Thanks for you help, Jeff.</description>
      <pubDate>Fri, 12 May 2006 09:09:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787033#M784111</guid>
      <dc:creator>Safdar Mustafa</dc:creator>
      <dc:date>2006-05-12T09:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: running remsh with su</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787034#M784112</link>
      <description>Anytime my friend.&lt;BR /&gt;Just understand that there'll be a learning curve here.&lt;BR /&gt;But the upside is that it's much more versatile than remsh. For instance you can pass keys between servers &amp;amp; login, run remote processes, do secure ftp &amp;amp; copies all w/o having to pass PWs. But even if you do - they're encrypted as well as *all* data.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 12 May 2006 09:15:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-remsh-with-su/m-p/3787034#M784112</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2006-05-12T09:15:18Z</dc:date>
    </item>
  </channel>
</rss>

