<?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 Use ssh in a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/use-ssh-in-a-script/m-p/2504566#M886980</link>
    <description>Hi,&lt;BR /&gt;How can I set a ssh key to allow user to use ssh in a script without asking for password?&lt;BR /&gt;Thank you.&lt;BR /&gt;June</description>
    <pubDate>Tue, 13 Mar 2001 17:23:21 GMT</pubDate>
    <dc:creator>June Cui</dc:creator>
    <dc:date>2001-03-13T17:23:21Z</dc:date>
    <item>
      <title>Use ssh in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/use-ssh-in-a-script/m-p/2504566#M886980</link>
      <description>Hi,&lt;BR /&gt;How can I set a ssh key to allow user to use ssh in a script without asking for password?&lt;BR /&gt;Thank you.&lt;BR /&gt;June</description>
      <pubDate>Tue, 13 Mar 2001 17:23:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/use-ssh-in-a-script/m-p/2504566#M886980</guid>
      <dc:creator>June Cui</dc:creator>
      <dc:date>2001-03-13T17:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use ssh in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/use-ssh-in-a-script/m-p/2504567#M886981</link>
      <description>You'll need to make sure that RSA authentication is enabled in your sshd_config&lt;BR /&gt;&lt;BR /&gt;1. Login as the user and generate a keypair using ssh-keygen.  You can use a null passphrase, but I don't recommend it.&lt;BR /&gt;2. Add the contents of the $HOME/.ssh/identity.pub file to the $HOME/.ssh/authorized_keys file on all machines where you wish to log in using RSA authentication.&lt;BR /&gt;3. If you don't use a null passphrase then to execute your script, write a small wrapper script which uses ssh-agent to launch your script.  'ssh-agent myscript'&lt;BR /&gt;4.  Your script will contain something like the following:&lt;BR /&gt;  #!/bin/sh&lt;BR /&gt;  #&lt;BR /&gt;  #  myscript --- does stuff&lt;BR /&gt;  # This script is running in the shell launched with ssh-agent&lt;BR /&gt;  #  Load the passphrase into memory&lt;BR /&gt;  cat .passphrase |ssh-add -p&lt;BR /&gt;  ssh &lt;REMOTESERVER&gt; &lt;COMMAND&gt;&lt;BR /&gt;&lt;BR /&gt;Carefully review all the man pages on the ssh commands.&lt;/COMMAND&gt;&lt;/REMOTESERVER&gt;</description>
      <pubDate>Tue, 13 Mar 2001 19:23:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/use-ssh-in-a-script/m-p/2504567#M886981</guid>
      <dc:creator>James A. Donovan</dc:creator>
      <dc:date>2001-03-13T19:23:19Z</dc:date>
    </item>
  </channel>
</rss>

