<?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: Automating ssh-agent/ssh-add in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415076#M747935</link>
    <description>Tony,&lt;BR /&gt;&lt;BR /&gt;That's not for single shell. You run 'mysshadd' only in the first shell and startup ssh-agent. For rest of the sessions, you simply 'source in' ssh-agent.conf. It won't ask you for password because you don't really run 'ssh-add' later. Try it and see if it is not what you wanted.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
    <pubDate>Fri, 05 Nov 2004 10:35:12 GMT</pubDate>
    <dc:creator>Sridhar Bhaskarla</dc:creator>
    <dc:date>2004-11-05T10:35:12Z</dc:date>
    <item>
      <title>Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415070#M747929</link>
      <description>Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I'm attempting to setup automatic ssh agency using the good old snail book. At present, I have the user runing ksh. The .profile runs&lt;BR /&gt;#ssh-agent $SHELL $HOME/.profile2.&lt;BR /&gt;&lt;BR /&gt;$HOME/.profile2 contains a .shrc call and the .shrc performs the ssh-add.&lt;BR /&gt;&lt;BR /&gt;When I log in, I'm prompted to enter my passphrase (ssh-add) but when I do the entire shell seems to close and I'm back to the original login shell. Can anyone point me in the right direction?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Tony&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Nov 2004 11:15:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415070#M747929</guid>
      <dc:creator>Tony Walker_2</dc:creator>
      <dc:date>2004-11-04T11:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415071#M747930</link>
      <description>Is the goal password free ssh?&lt;BR /&gt;&lt;BR /&gt;If so, read the doc I'm attaching. If not, I don't understand the goal and you may wish to clarify.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 04 Nov 2004 11:19:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415071#M747930</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-11-04T11:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415072#M747931</link>
      <description>Stephen,&lt;BR /&gt;&lt;BR /&gt;Thanks. I have already configured the host based authentication but am now experimenting with enforcing a passphrase for the key generation. To take the anoyance of typing it in for each ssh operation I want to start an ssh-agent and add an identity as soon as a user logs in (Chap 6 in the O'Reily book).&lt;BR /&gt;&lt;BR /&gt;Tony</description>
      <pubDate>Thu, 04 Nov 2004 11:24:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415072#M747931</guid>
      <dc:creator>Tony Walker_2</dc:creator>
      <dc:date>2004-11-04T11:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415073#M747932</link>
      <description>You can try placing the following commands in $HOME/.profile (insert full paths to ssh-agent and ssh-add).&lt;BR /&gt;&lt;BR /&gt;eval `ssh-agent`&lt;BR /&gt;ssh-add</description>
      <pubDate>Thu, 04 Nov 2004 20:04:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415073#M747932</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2004-11-04T20:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415074#M747933</link>
      <description>Tony,&lt;BR /&gt;&lt;BR /&gt;A little trick. Create a script say 'mysshadd' with the following:&lt;BR /&gt;&lt;BR /&gt;ssh-agent &amp;gt; /home/user/.ssh/ssh-agent.conf&lt;BR /&gt;chmod 600 /home/user/.ssh/ssh-agent.conf&lt;BR /&gt;. /home/user/.ssh/ssh-agent.conf&lt;BR /&gt;ssh-add /home/user/.ssh/id_dsa&lt;BR /&gt;echo "Run . /home/user/.ssh/ssh-agent.conf now"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;First time, run this script and it will prompt for the passphrase. Once it is done it will be copied into memory. Put the following line in your .profile&lt;BR /&gt;&lt;BR /&gt;. /home/user/.ssh/ssh-agent.conf&lt;BR /&gt;&lt;BR /&gt;Subsequent windows you open will use the ssh-agent started in the first session.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Nov 2004 20:32:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415074#M747933</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-11-04T20:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415075#M747934</link>
      <description>Ermin, Sridha,&lt;BR /&gt;&lt;BR /&gt;I have already got this working fine with the single-shell method but I specificall want to use the sub-shell method as discussed in the book.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Tony</description>
      <pubDate>Fri, 05 Nov 2004 04:07:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415075#M747934</guid>
      <dc:creator>Tony Walker_2</dc:creator>
      <dc:date>2004-11-05T04:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415076#M747935</link>
      <description>Tony,&lt;BR /&gt;&lt;BR /&gt;That's not for single shell. You run 'mysshadd' only in the first shell and startup ssh-agent. For rest of the sessions, you simply 'source in' ssh-agent.conf. It won't ask you for password because you don't really run 'ssh-add' later. Try it and see if it is not what you wanted.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Fri, 05 Nov 2004 10:35:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415076#M747935</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-11-05T10:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415077#M747936</link>
      <description>You can try dropping $HOME/.profile2 from ssh-agent invocation (also add exec).&lt;BR /&gt;&lt;BR /&gt;Put the following at the end of your $HOME/.profile.&lt;BR /&gt;&lt;BR /&gt;ENV=$HOME/.shrc; export ENV&lt;BR /&gt;exec ssh-agent $SHELL&lt;BR /&gt;&lt;BR /&gt;And in your $HOME/.shrc have&lt;BR /&gt;&lt;BR /&gt;ssh-add&lt;BR /&gt;&lt;BR /&gt;On exit from the shell ssh-agent will be terminated.</description>
      <pubDate>Sun, 07 Nov 2004 18:22:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415077#M747936</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2004-11-07T18:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415078#M747937</link>
      <description>&lt;BR /&gt;If you need to use passphrases (or want to), check out "keychain". "keychain" makes the ssh-agent/passphrase stuff pretty convenient.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www-106.ibm.com/developerworks/library/l-keyc.html" target="_blank"&gt;http://www-106.ibm.com/developerworks/library/l-keyc.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Then, when you add the following to your ".profile", you'll be asked to enter your passphrase. You won't need to enter your passphase untill the machine is rebooted. (Note: $USERLOCAL should be replaced with whatever directory the keychain stuff located.)&lt;BR /&gt;&lt;BR /&gt; $USERLOCAL/keychain-2.4.2.1/keychain id_rsa&lt;BR /&gt; host=`uname -n`&lt;BR /&gt; [ -f $HOME/.keychain/$host-sh ] &amp;amp;&amp;amp; \&lt;BR /&gt; . $HOME/.keychain/$host-sh&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Nov 2004 13:54:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415078#M747937</guid>
      <dc:creator>David_779</dc:creator>
      <dc:date>2004-11-15T13:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Automating ssh-agent/ssh-add</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415079#M747938</link>
      <description>This is a snippet of script that I have in my .profile that has worked well for me.  I don't know how I came by it, but it has been reliable under ksh on solaris.  You will have to change the paths for all of the binaries to match your version of ssh ( HPUX version will install under /opt/... rather then /usr/local/.&lt;BR /&gt;I think the reason that your ssh-agent dies is because ssh-agent needs to be run as "eval ssh-agent..." and not just executed.&lt;BR /&gt;&lt;BR /&gt;# Make sure ssh-agent1 and ssh-agent2 die on logout&lt;BR /&gt;trap '&lt;BR /&gt;  test -n "$SSH_AGENT_PID"  &amp;amp;&amp;amp; eval `/usr/local/bin/ssh-agent -k` ;&lt;BR /&gt;  test -n "$SSH2_AGENT_PID" &amp;amp;&amp;amp; kill $SSH2_AGENT_PID&lt;BR /&gt;' 0&lt;BR /&gt;&lt;BR /&gt;# If no agent is running and we have a terminal, run ssh-agent and ssh-add.&lt;BR /&gt;# (For SSH2, change this to use SSH2_AUTH_SOCK, ssh-agent2 and ssh-add2.)&lt;BR /&gt;if [ "$SSH_AUTH_SOCK" = "" ]&lt;BR /&gt;then&lt;BR /&gt;  eval `/usr/local/bin/ssh-agent`&lt;BR /&gt;  /usr/bin/tty &amp;gt; /dev/null &amp;amp;&amp;amp; /usr/local/bin/ssh-add&lt;BR /&gt;fi</description>
      <pubDate>Mon, 15 Nov 2004 16:21:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-ssh-agent-ssh-add/m-p/3415079#M747938</guid>
      <dc:creator>SPO Distributed Svcs</dc:creator>
      <dc:date>2004-11-15T16:21:53Z</dc:date>
    </item>
  </channel>
</rss>

