<?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: Query About SSH in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680817#M382529</link>
    <description>i think when u do su - username , u open another shell and this script stops functioning .&lt;BR /&gt;&lt;BR /&gt;if you want to run command as the user "username" , you could try ssh username@hostname and then run the command .&lt;BR /&gt;However, the previously configured ssh keys will not work here ,as this is a different user.</description>
    <pubDate>Mon, 30 Aug 2010 11:22:37 GMT</pubDate>
    <dc:creator>Amit Shrivastava_1</dc:creator>
    <dc:date>2010-08-30T11:22:37Z</dc:date>
    <item>
      <title>Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680816#M382528</link>
      <description>Dear,&lt;BR /&gt;&lt;BR /&gt;We need to execute one command from remote host to stop one service. Already SSH key has configured. I tried with below command. Able to connect the host But the command is not executed.&lt;BR /&gt;&lt;BR /&gt;ssh -t hostname su - username &lt;BR /&gt;-c "/usr/sap/DAA/SYS/exe/uc/hpia64/sapcontrol &lt;BR /&gt;-nr 24 -function StopService"&lt;BR /&gt;&lt;BR /&gt;When I run this command locally, it is working.&lt;BR /&gt;&lt;BR /&gt;Help me on this to resolve this issue.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shameem</description>
      <pubDate>Mon, 30 Aug 2010 10:22:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680816#M382528</guid>
      <dc:creator>shameemsoft</dc:creator>
      <dc:date>2010-08-30T10:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680817#M382529</link>
      <description>i think when u do su - username , u open another shell and this script stops functioning .&lt;BR /&gt;&lt;BR /&gt;if you want to run command as the user "username" , you could try ssh username@hostname and then run the command .&lt;BR /&gt;However, the previously configured ssh keys will not work here ,as this is a different user.</description>
      <pubDate>Mon, 30 Aug 2010 11:22:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680817#M382529</guid>
      <dc:creator>Amit Shrivastava_1</dc:creator>
      <dc:date>2010-08-30T11:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680818#M382530</link>
      <description>Thanks Amit for your response.&lt;BR /&gt;&lt;BR /&gt;But I need to login as root first then only i need to login as normal user to execute the command. Because SSH Key is configured only for root account &amp;amp; should not be for normal user in our environment.&lt;BR /&gt;&lt;BR /&gt;Is there any possibilities?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shameem</description>
      <pubDate>Mon, 30 Aug 2010 11:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680818#M382530</guid>
      <dc:creator>shameemsoft</dc:creator>
      <dc:date>2010-08-30T11:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680819#M382531</link>
      <description>I forgot to add one more information. I tried different command using same syntax. it is working.. &lt;BR /&gt;&lt;BR /&gt;I checked the command which is not working properly. command syntax is correct. i dont know why it is not working.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shameem</description>
      <pubDate>Mon, 30 Aug 2010 11:48:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680819#M382531</guid>
      <dc:creator>shameemsoft</dc:creator>
      <dc:date>2010-08-30T11:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680820#M382532</link>
      <description>in generally locally working means that different environment variables , solution use absolute path rather than relative path.&lt;BR /&gt;As far as I can see already used full path, so be sure your remote server can accept the above command locally ?</description>
      <pubDate>Mon, 30 Aug 2010 12:31:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680820#M382532</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2010-08-30T12:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680821#M382533</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;do a straight login to the the remote server.&lt;BR /&gt;&lt;BR /&gt;ll usr/sap/DAA/SYS/exe/uc/hpia64/sapcontrol &lt;BR /&gt;&lt;BR /&gt;You are using the full path of the command. That should negate any environment problems.&lt;BR /&gt;&lt;BR /&gt;You are also doing an su - username&lt;BR /&gt;&lt;BR /&gt;These steps need to be tested individually to know which part is failing.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 30 Aug 2010 12:59:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680821#M382533</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-08-30T12:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680822#M382534</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;As others have mentioned, enabling the keys to log into the correct user the first time instead of su'ing into it is the cleaner approach.&lt;BR /&gt;&lt;BR /&gt;If, for whatever reason (probably political) that's not practical, create a script that contains that line:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;. /root/.profile # or where ever root's profile is&lt;BR /&gt;&lt;BR /&gt;su - ${user} -c "/usr/sap/DAA/SYS/exe/uc/hpia64/sapcontrol &lt;BR /&gt;-nr 24 -function StopService"&lt;BR /&gt;# eof&lt;BR /&gt;&lt;BR /&gt;then call the script from the ssh command:&lt;BR /&gt;&lt;BR /&gt;ssh -t ${host} /root/bin/sapcontrol&lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Mon, 30 Aug 2010 15:58:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680822#M382534</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2010-08-30T15:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680823#M382535</link>
      <description>try with adding the '-t' option to your ssh command.</description>
      <pubDate>Tue, 31 Aug 2010 06:47:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680823#M382535</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2010-08-31T06:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680824#M382536</link>
      <description>Thank you for your response.&lt;BR /&gt;&lt;BR /&gt;I tried to login directly without su as per Mr. Steven. It is working fine&lt;BR /&gt;&lt;BR /&gt;ssh -t username@juepp04 "/usr/sap/DAA/SYS/exe/uc/hpia64/sapcontrol -nr 24 -function StopService"&lt;BR /&gt;&lt;BR /&gt;It is failed when I use su on this command. But it is working(with su) when I start the service :). Any specific reason for this?&lt;BR /&gt;&lt;BR /&gt;Also I have created script separately as per &lt;BR /&gt;Mr. Doug, it is working fine.&lt;BR /&gt;&lt;BR /&gt;One more information, i need to run this command from cluster package. separate script is ok? or anything needs to be done ?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Shameem&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Aug 2010 07:06:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680824#M382536</guid>
      <dc:creator>shameemsoft</dc:creator>
      <dc:date>2010-08-31T07:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Query About SSH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680825#M382537</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;As long as the separate script is either in a relocatable filesystem or in the same place on both systems if using a local filesystem, you can run it from the package control script w/o issue.&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Thu, 02 Sep 2010 02:58:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-about-ssh/m-p/4680825#M382537</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2010-09-02T02:58:43Z</dc:date>
    </item>
  </channel>
</rss>

