<?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 sftp - a better way to script? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925552#M97201</link>
    <description>I've noticed that scripting sftp using "expect" is pretty unreliable if timing isn't right.&lt;BR /&gt;&lt;BR /&gt;Has anyone come up with a better way to script sftp transfers from HPUX?  A better sftp tool running on HPUX perhaps?&lt;BR /&gt;&lt;BR /&gt;Does anyone have example perl code I use as a base to get started?&lt;BR /&gt;&lt;BR /&gt;Other suggestions?&lt;BR /&gt;&lt;BR /&gt;Thanks very much in advance,&lt;BR /&gt;&lt;BR /&gt;John</description>
    <pubDate>Fri, 12 Jan 2007 14:09:02 GMT</pubDate>
    <dc:creator>TwoProc</dc:creator>
    <dc:date>2007-01-12T14:09:02Z</dc:date>
    <item>
      <title>sftp - a better way to script?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925552#M97201</link>
      <description>I've noticed that scripting sftp using "expect" is pretty unreliable if timing isn't right.&lt;BR /&gt;&lt;BR /&gt;Has anyone come up with a better way to script sftp transfers from HPUX?  A better sftp tool running on HPUX perhaps?&lt;BR /&gt;&lt;BR /&gt;Does anyone have example perl code I use as a base to get started?&lt;BR /&gt;&lt;BR /&gt;Other suggestions?&lt;BR /&gt;&lt;BR /&gt;Thanks very much in advance,&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Fri, 12 Jan 2007 14:09:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925552#M97201</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-01-12T14:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: sftp - a better way to script?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925553#M97202</link>
      <description>Hi John:&lt;BR /&gt;&lt;BR /&gt;Perl has a core module 'Net::FTP'.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://perldoc.perl.org/Net/FTP.html" target="_blank"&gt;http://perldoc.perl.org/Net/FTP.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 12 Jan 2007 14:15:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925553#M97202</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-01-12T14:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: sftp - a better way to script?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925554#M97203</link>
      <description>When I script secure transfers I usually use scp rather than sftp. scp doesn't try to be interactive, but it also doesn't have all the same functionality as sftp (renaming files and such). For things like that I usually run remote commands through ssh instead.&lt;BR /&gt;&lt;BR /&gt;Another option would be lftp, which can open sftp sessions and is supposed to be reasonably script-friendly. I haven't used it on HP-UX so I don't know if it has any issues.&lt;BR /&gt;&lt;BR /&gt;Net::SFTP would be the appropriate perl module, not Net::FTP. I've never used it, so I can't comment on how well it works.</description>
      <pubDate>Fri, 12 Jan 2007 14:37:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925554#M97203</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2007-01-12T14:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: sftp - a better way to script?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925555#M97204</link>
      <description>Hi (again) John:&lt;BR /&gt;&lt;BR /&gt;Sorry, I read too fast!  CPAN has an 'sftp' module, 'Net::SFTP':&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP.pm" target="_blank"&gt;http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP.pm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Jan 2007 14:56:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925555#M97204</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-01-12T14:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: sftp - a better way to script?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925556#M97205</link>
      <description>Use keys!&lt;BR /&gt;&lt;BR /&gt;Then no need to worry about passwords....&lt;BR /&gt;&lt;BR /&gt;Example shell script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#### script to transfer .csv files over to Comapny INTL ####&lt;BR /&gt;###  contact John Doe for Help  ###&lt;BR /&gt;## script Written by Me ##&lt;BR /&gt;set -xv&lt;BR /&gt;cd /export/APPL/xxx/outbound&lt;BR /&gt;cp -r * ../backup&lt;BR /&gt;for i in `ls -1 pctcp*.csv` ; do echo $i ; fname=`echo $i | awk -F. '{print $1}'` ; echo $fname ; mv $i $fname.txt ; done&lt;BR /&gt;sftp -b /export/APPL/xxx/batchscript auserid@sftp.somewhers.ca&lt;BR /&gt;pwd&lt;BR /&gt;mv * /export/APPL/xxx/archive&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 12 Jan 2007 15:01:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925556#M97205</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2007-01-12T15:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: sftp - a better way to script?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925557#M97206</link>
      <description>JRF, thanks I knew that CPAN has a module, I was hoping to find someone already using it, and had an example perl script I could modify to make it work - my Perl skills are lacking, to say the least.  I've "made" things work, but I'm pretty awfull with it, even on a good day.  I do appreciate the advice, however, all help from the great people in this forum is always appreciated.&lt;BR /&gt;&lt;BR /&gt;Geoff, I don't know why, but I can't get the keys to work on the "other guy's" machine.  I don't know if he can't set something up right, etc.  I have no problem using it here across many different platforms, but I'm not the admin on their box, and I can't get them to want to fix their problem badly enough (I guess).&lt;BR /&gt;&lt;BR /&gt;Thanks all, any more ideas greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Anyone familiar with using a product called "sftpplus" by ProAtria?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Jan 2007 16:19:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sftp-a-better-way-to-script/m-p/3925557#M97206</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-01-12T16:19:35Z</dc:date>
    </item>
  </channel>
</rss>

