<?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 how to run FTP through scripts .... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768703#M896008</link>
    <description>Hi i want to automate the ftp procedure through crontab entries ..... does any one did scripting to do this ?&lt;BR /&gt;&lt;BR /&gt;I've a list of files and their corresponding locations on the host server .... every fortnight on week ends, i need to ftp those files to new locations in my remote client ....&lt;BR /&gt;&lt;BR /&gt;In my network, the client can connect to the Host using ftp/telnet etc., but the host is protected by firewall to see the client ...&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;</description>
    <pubDate>Mon, 22 Jul 2002 03:10:34 GMT</pubDate>
    <dc:creator>Bala_8</dc:creator>
    <dc:date>2002-07-22T03:10:34Z</dc:date>
    <item>
      <title>how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768703#M896008</link>
      <description>Hi i want to automate the ftp procedure through crontab entries ..... does any one did scripting to do this ?&lt;BR /&gt;&lt;BR /&gt;I've a list of files and their corresponding locations on the host server .... every fortnight on week ends, i need to ftp those files to new locations in my remote client ....&lt;BR /&gt;&lt;BR /&gt;In my network, the client can connect to the Host using ftp/telnet etc., but the host is protected by firewall to see the client ...&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 03:10:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768703#M896008</guid>
      <dc:creator>Bala_8</dc:creator>
      <dc:date>2002-07-22T03:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768704#M896009</link>
      <description>#!/bin/sh&lt;BR /&gt;set -x&lt;BR /&gt;ftp -i -n &amp;lt;&amp;lt; !EOF&lt;BR /&gt;open 10.196.8.241&lt;BR /&gt;user anonymous scott@unix.com&lt;BR /&gt;cd /tmp&lt;BR /&gt;bin&lt;BR /&gt;put today.html&lt;BR /&gt;bye&lt;BR /&gt;!EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the set -x just reports the variables being set etc but it isn't required for real.&lt;BR /&gt;&lt;BR /&gt;you can put any commands you like in here that you can use with ftp.&lt;BR /&gt;&lt;BR /&gt;You could for example go:&lt;BR /&gt;&lt;BR /&gt;prompt&lt;BR /&gt;mput *.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Scott.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 03:39:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768704#M896009</guid>
      <dc:creator>Scott Van Kalken</dc:creator>
      <dc:date>2002-07-22T03:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768705#M896010</link>
      <description>Hi,&lt;BR /&gt;Another example&lt;BR /&gt;&lt;BR /&gt;  ftp -nv $dis_machine &amp;gt; /dev/null &amp;lt;</description>
      <pubDate>Mon, 22 Jul 2002 03:56:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768705#M896010</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-07-22T03:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768706#M896011</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You would need to open port 22 to let ftp traffic through. Not a good choice. You should perhaps look at using openssh with 'sftp'. It comes as part of the package. You can download the latest version (source) and compile it from &lt;A href="http://openssh.org" target="_blank"&gt;http://openssh.org&lt;/A&gt; The current version from the porting centre has been identified as having a security hole.&lt;BR /&gt;&lt;BR /&gt;The scripts that other guys have provided may in fact work with 'sftp'&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 04:11:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768706#M896011</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-07-22T04:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768707#M896012</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;As already mentioned, FTP is cleartext (i.e. data traffic can be sniffed on the network) and requires ftp-control (TCP/21) and ftp-data (TCP/20) to be opened at your firewall.&lt;BR /&gt;&lt;BR /&gt;Apart from sftp as mentioned, you might also want to consider scp (the secured equivalent of rcp) and make use of public key trust relationships to automate file transfers securely. The ssh family provides security features of confidentiality, integrity and non-repudiation.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Mon, 22 Jul 2002 04:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768707#M896012</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-07-22T04:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768708#M896013</link>
      <description>Here is what I do:&lt;BR /&gt;&lt;BR /&gt;My shell script which is run from cron has the following command (among other things)&lt;BR /&gt;&lt;BR /&gt;ftp -n -v &amp;lt; cmdstosend &amp;gt; logfile 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;The cmdtosend file has the following ftp commands in it:&lt;BR /&gt;&lt;BR /&gt;open ip.address&lt;BR /&gt;user username password&lt;BR /&gt;cd "full_path"&lt;BR /&gt;pwd (just to echo for my log file)&lt;BR /&gt;lcd full_path&lt;BR /&gt;binary (or ascii)&lt;BR /&gt;put file&lt;BR /&gt;close quit&lt;BR /&gt;&lt;BR /&gt;I then e-mail myself the log file for verification.</description>
      <pubDate>Mon, 22 Jul 2002 18:51:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768708#M896013</guid>
      <dc:creator>Jeanine Kone</dc:creator>
      <dc:date>2002-07-22T18:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768709#M896014</link>
      <description>I'll give you my standard answer: Do this in Perl. You get error checking for free and that is a non-trivial exercise using other scripting approaches. The other nice thing is that the same script will run on NT.&lt;BR /&gt;&lt;BR /&gt;I've attached an example script.&lt;BR /&gt;&lt;BR /&gt;It first logs you in to a remote server, change the remote host, user, and password to suit your needs. It then does a cwd to /tmp and puts ftp in 'binary mode'. It then reads the command line for filenames to send. It will try each one up to 5 times. The beauty of doing this in perl is that the error checking is built right in. You will need to download and install the Net::FTP module from &lt;A href="http://www.perl.org/CPAN" target="_blank"&gt;http://www.perl.org/CPAN&lt;/A&gt; but after that you are done. I never bother trying to do this stuff in the shell anymore because this is so much easier. &lt;BR /&gt;&lt;BR /&gt;P.S. If you need to punch through a proxy server, simply supply a 3rd argument to the login subroutine and it will be just like you typed the account ftp command yourself. &lt;BR /&gt;&lt;BR /&gt;Regards, Clay  &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 19:08:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768709#M896014</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-22T19:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768710#M896015</link>
      <description>&lt;BR /&gt;I agree with Clay. He's provided quite a few examples here on the forum and it's the only way I would go.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 22 Jul 2002 20:26:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768710#M896015</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-07-22T20:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768711#M896016</link>
      <description>Hi Bala,&lt;BR /&gt;&lt;BR /&gt;just like the rest I do not recommend "ftp" for this (and if you do use it anyway, please look at the "$HOME/.netrc" feature - "man netrc").&lt;BR /&gt;Investigate into tools like "scp" (part of SSH), or my favourite for this task "rsync" (using SSH for the transport).&lt;BR /&gt;See &lt;A href="http://rsync.samba.org" target="_blank"&gt;http://rsync.samba.org&lt;/A&gt; for details.&lt;BR /&gt;There are "rsync" clients for windows, too!&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2002 20:37:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768711#M896016</guid>
      <dc:creator>Wodisch_1</dc:creator>
      <dc:date>2002-07-22T20:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to run FTP through scripts ....</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768712#M896017</link>
      <description>hi all,&lt;BR /&gt;&lt;BR /&gt;thanks all for your valuable feedback ....&lt;BR /&gt;your replies solved my problem ....&lt;BR /&gt;&lt;BR /&gt;thanks again&lt;BR /&gt;&lt;BR /&gt;-bala-&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Jul 2002 03:36:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-run-ftp-through-scripts/m-p/2768712#M896017</guid>
      <dc:creator>Bala_8</dc:creator>
      <dc:date>2002-07-23T03:36:39Z</dc:date>
    </item>
  </channel>
</rss>

