<?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: sftp automated script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752166#M388322</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Setup public ssh keys between your servers.  Then you can do something like:&lt;BR /&gt;&lt;BR /&gt;# cat .mysftp&lt;BR /&gt;HOST=$1&lt;BR /&gt;FILE=$2&lt;BR /&gt;sftp -b - &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;lcd /tmp&lt;BR /&gt;cd /tmp&lt;BR /&gt;put -P ${FILE} ${FILE}.backup&lt;BR /&gt;EOF&lt;BR /&gt;RC=$?&lt;BR /&gt;print -u2 "\nSFTP returned ${RC}"&lt;BR /&gt;exit ${RC}&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Sun, 13 Feb 2011 14:41:31 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-02-13T14:41:31Z</dc:date>
    <item>
      <title>sftp automated script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752165#M388321</link>
      <description>What is the syntax in HP Ux script to invoke sftp using the open command? my script looks like this&lt;BR /&gt;open nashualocal&lt;BR /&gt;user FTPUser N@shua!&lt;BR /&gt;type ascii&lt;BR /&gt;cd Nashua/New_Orders&lt;BR /&gt;lcd /usr1/EMBRACE/EMBRACE.LIVE/NASHUA.SALES&lt;BR /&gt;mget *.csv&lt;BR /&gt;lcd /usr1/EMBRACE/EMBRACE.LIVE/NASHUA.SALES.BACKUP&lt;BR /&gt;mget *.csv&lt;BR /&gt;cd /Nashua/New_Orders&lt;BR /&gt;pwd&lt;BR /&gt;!uuencode /usr/bin/nash1.log nash1.log.csv | mailx -m -s "Nashua Confirmation" l&lt;BR /&gt;moodley@tarsus.co.za hdebloe@tarsus.co.za ebrown@tarsus.co.za&lt;BR /&gt;quit&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Feb 2011 08:21:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752165#M388321</guid>
      <dc:creator>Links Moodley</dc:creator>
      <dc:date>2011-02-13T08:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: sftp automated script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752166#M388322</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Setup public ssh keys between your servers.  Then you can do something like:&lt;BR /&gt;&lt;BR /&gt;# cat .mysftp&lt;BR /&gt;HOST=$1&lt;BR /&gt;FILE=$2&lt;BR /&gt;sftp -b - &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;lcd /tmp&lt;BR /&gt;cd /tmp&lt;BR /&gt;put -P ${FILE} ${FILE}.backup&lt;BR /&gt;EOF&lt;BR /&gt;RC=$?&lt;BR /&gt;print -u2 "\nSFTP returned ${RC}"&lt;BR /&gt;exit ${RC}&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 13 Feb 2011 14:41:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752166#M388322</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-02-13T14:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: sftp automated script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752167#M388323</link>
      <description>Thank You for that James, excuse my ingnorance, how do I setup up the public ssh keys on my server and the external server.&lt;BR /&gt;Regards,&lt;BR /&gt;Links</description>
      <pubDate>Sun, 13 Feb 2011 17:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752167#M388323</guid>
      <dc:creator>Links Moodley</dc:creator>
      <dc:date>2011-02-13T17:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: sftp automated script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752168#M388324</link>
      <description>&lt;P&gt;Hi (again):&lt;BR /&gt;&lt;BR /&gt;You can and should avoid passwords in scripts if you are automating Secure Shell functions like 'scp', 'sftp', etc. Public keys provide the methodology. &lt;BR /&gt;&lt;BR /&gt;Matti Kurkela gives a quick-step view here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/sample-script-for-scp-and-sftp/m-p/4243294#M330281" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/sample-script-for-scp-and-sftp/m-p/4243294#M330281&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;...and Doug O'Leary provides a detailed guide here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.olearycomputers.com/ll/ssh_guide.html" target="_blank"&gt;http://www.olearycomputers.com/ll/ssh_guide.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The 'known_hosts' file contains the public host keys for all known hosts. The per-user version is maintained automatically. Thus, whenever you connect from an unknown host, its key is added to the per-user file if you choose to acknowledge the fingerprint. If you don't, the connection can still be made, but you will be prompted the next time as if you had never connected.&lt;BR /&gt;&lt;BR /&gt;The manpages for 'sshd' and 'ssh' offer more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2011 18:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-automated-script/m-p/4752168#M388324</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-08-08T18:43:08Z</dc:date>
    </item>
  </channel>
</rss>

