<?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: ssh/sftp in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270867#M884483</link>
    <description>This would be the same as a regular ftp script.&lt;BR /&gt;&lt;BR /&gt;Here is my cut.&lt;BR /&gt;&lt;BR /&gt;If you exchange public keys, you can use scp for one line command copies between any servers running openssh.&lt;BR /&gt;&lt;BR /&gt;Attaching a doc:&lt;BR /&gt;&lt;BR /&gt;sftp usrname@hostname &amp;lt;&amp;lt; END&lt;BR /&gt;&lt;PASSWORD&gt;&lt;BR /&gt;put filename&lt;BR /&gt;bye&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/PASSWORD&gt;</description>
    <pubDate>Fri, 07 May 2004 13:10:00 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2004-05-07T13:10:00Z</dc:date>
    <item>
      <title>ssh/sftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270865#M884481</link>
      <description>I would like to write a script that will sftp a file from one server to another.  Exmaple: I will ssh from master/host to slave/server.  Then want to do an sftp of a file from the slave/server to the master/host.  I want to set up a cron file to have this run automatically.  Any suggestions?</description>
      <pubDate>Fri, 07 May 2004 13:00:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270865#M884481</guid>
      <dc:creator>Raymond Ford</dc:creator>
      <dc:date>2004-05-07T13:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: ssh/sftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270866#M884482</link>
      <description>Rather than scripting with sftp use scp and set prefered auth to use public key 1st.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;your script would use scp similar to...&lt;BR /&gt;&lt;BR /&gt;scp /local_path/file username@remote:/remote_path&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You'd also have to setup the user's ~/.ssh/authorized_keys file and keep the passphrase empty. This would make it so that the cron job could run without user interaction.&lt;BR /&gt;&lt;BR /&gt;-denver</description>
      <pubDate>Fri, 07 May 2004 13:07:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270866#M884482</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2004-05-07T13:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: ssh/sftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270867#M884483</link>
      <description>This would be the same as a regular ftp script.&lt;BR /&gt;&lt;BR /&gt;Here is my cut.&lt;BR /&gt;&lt;BR /&gt;If you exchange public keys, you can use scp for one line command copies between any servers running openssh.&lt;BR /&gt;&lt;BR /&gt;Attaching a doc:&lt;BR /&gt;&lt;BR /&gt;sftp usrname@hostname &amp;lt;&amp;lt; END&lt;BR /&gt;&lt;PASSWORD&gt;&lt;BR /&gt;put filename&lt;BR /&gt;bye&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/PASSWORD&gt;</description>
      <pubDate>Fri, 07 May 2004 13:10:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270867#M884483</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-05-07T13:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: ssh/sftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270868#M884484</link>
      <description>generate your ssh keys on both systems.  Then copy your public to the oher server in the .ssh/authorized_keys2 file.&lt;BR /&gt;Note you will need to coonect manually each directions if that is what you intend once and answer yes to add the hostnames to the known hosts.&lt;BR /&gt;This way you can sftp without a password, assuming you do not have a passphrase.&lt;BR /&gt;You can get fancier specify a passphase and set up the keys agent to pass the passphrase for you.  In the long run this might be more secure.&lt;BR /&gt;&lt;BR /&gt;next set up a cron to scp the file&lt;BR /&gt;file as the correct user you are using. If you run the job as root and send the file as a user you will have more to do in the sense you will need to specify the key location with the -i scp option and put the keys in root.  This is a bit more overhead than you may want to deal with.&lt;BR /&gt;scp hosta:/tmp/yourfile hostb:/yourdirectory.</description>
      <pubDate>Fri, 07 May 2004 14:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-sftp/m-p/3270868#M884484</guid>
      <dc:creator>generic_1</dc:creator>
      <dc:date>2004-05-07T14:27:45Z</dc:date>
    </item>
  </channel>
</rss>

