<br>It is shocking at the number of zillion year-old applications that STILL use plain ftp with open text authentication.<br>Much of this is from stupid code design that used custom written ftp &quot;servers&quot; instead of relying on the in-system ftpd that could be easily upgraded to include sftp capability.<br>
<br>&lt;sigh&gt;<br><br>Just because one _can_ write code doesn&#39;t mean one should. I know I&#39;ve written my share of horrid crap.<br><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 5:46 PM, Lightner, Jeff <span dir="ltr">&lt;<a href="mailto:JLightner@water.com" target="_blank">JLightner@water.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div link="blue" vlink="purple" lang="EN-US">
<p></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I think earlier in the thread someone suggested sftp and the reply was that the other side only allows for standard ftp.   If sftp doesn’t work then scp typically
 won’t either.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">One can get a tad more security out of ftp by pgp (or gpg) encrypting the files before placing them in the transfer directory.   Also you’d want to jail any
 login account you gave others to your servers and hope they’re smart enough to jail any they give you on theirs.   The login session is still in clear text but anyone that hacks the login only sees gobbledygook so long as they don’t have the keys and the jail
 prevents them from seeing anything else.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:ale-bounces@ale.org" target="_blank">ale-bounces@ale.org</a> [mailto:<a href="mailto:ale-bounces@ale.org" target="_blank">ale-bounces@ale.org</a>]
<b>On Behalf Of </b>Matthew<br>
<b>Sent:</b> Tuesday, January 22, 2013 5:23 PM<br>
<b>To:</b> Atlanta Linux Enthusiasts<br>
<b>Subject:</b> Re: [ale] FTP files<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p>Scp?  I rarely use ftp.<u></u><u></u></p>
<div>
<p class="MsoNormal">On Jan 22, 2013 4:55 PM, &quot;Jim Kinney&quot; &lt;<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>&gt; wrote:<u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">You did change the ftp command to ftp -i ? That should drop the confirm for mput.<u></u><u></u></p>
<div>
<p class="MsoNormal">On Tue, Jan 22, 2013 at 4:42 PM, Chuck Payne &lt;<a href="mailto:terrorpup@gmail.com" target="_blank">terrorpup@gmail.com</a>&gt; wrote:<u></u><u></u></p>
<p class="MsoNormal">It working, but it only putting one file, the reason it is doing this...<br>
<br>
mput dag2.txt? mput dag3.txt?  221 Goodbye.<br>
<br>
Is it asking me to enter &quot;yes&quot; for the other files?<br>
<span style="color:#888888"><br>
Chuck</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On Tue, Jan 22, 2013 at 12:35 PM, Jim Kinney &lt;<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>&gt; wrote:<br>
&gt; The heredoc format of the ftp line looks wrong. also, you are iterating over<br>
&gt; a list of files and creating a new ftp connection for each file. Instead<br>
&gt; use:<br>
&gt;<br>
&gt; mytemp=$(mktemp -d)<br>
&gt; mylog=$(mktemp)<br>
&gt; cp $(cat /chroot/home/fl/fl_sdirc/files.txt) ${mytemp}<br>
&gt; cd ${mytemp}<br>
&gt; ftp -i &lt;host&gt; 2&gt;$1&gt;${mylog} &lt;&lt; EOF<br>
&gt; user &lt;name&gt; &lt;passwd&gt;<br>
&gt; binary<br>
&gt; cd &lt;remote path to file location&gt;<br>
&gt; mput *<br>
&gt; exit<br>
&gt; EOF<br>
&gt;<br>
&gt; On Tue, Jan 22, 2013 at 12:18 PM, Chuck Payne &lt;<a href="mailto:terrorpup@gmail.com" target="_blank">terrorpup@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Guys,<br>
&gt;&gt;<br>
&gt;&gt; Ok, I think I have a better script, but I am having a problem with the<br>
&gt;&gt; for/loop with ftp&#39;ing files, looks like it breaking at the &lt;&lt;+<br>
&gt;&gt;<br>
&gt;&gt; Here is my new script<br>
&gt;&gt;<br>
&gt;&gt; ========================Begin Script=================================<br>
&gt;&gt;<br>
&gt;&gt; #!/bin/bash<br>
&gt;&gt; # ftp script<br>
&gt;&gt; # by Chuck Payne<br>
&gt;&gt; # ftp, logs, and moves files<br>
&gt;&gt;<br>
&gt;&gt; LOG=$(/var/log/fl_sdirc)<br>
&gt;&gt; FILES=$(cat /chroot/home/fl/fl_sdirc/files.txt | wc -l)<br>
&gt;&gt; TIME=$(`date &#39;+%m-%d-%Y %H:%M&#39;`)<br>
&gt;&gt; FILE=$(/chroot/home/fl/fl_sdirc/files.txt)<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; if [ -e $FILE ] ; then<br>
&gt;&gt;   rm -f $FILE<br>
&gt;&gt; fi<br>
&gt;&gt;<br>
&gt;&gt; ls /chroot/home/fl/fl_sdirc &gt;&gt; /chroot/home/fl/fl_sdirc/files.txt<br>
&gt;&gt;<br>
&gt;&gt; if [ $FILE==&quot;0&quot;] ; then<br>
&gt;&gt;   echo &quot;$TIME&quot; &gt;&gt; $LOG<br>
&gt;&gt;   echo &quot;No Files tranfer&quot; &gt;&gt; $LOG<br>
&gt;&gt; else<br>
&gt;&gt;<br>
&gt;&gt; for i in `cat /chroot/home/fl/fl_sdirc/files.txt` ; do<br>
&gt;&gt;   ftp -n 192.168.105.29 &lt;&lt;+<br>
&gt;&gt;   user flsdir essex<br>
&gt;&gt;   binary<br>
&gt;&gt;   put $i<br>
&gt;&gt;   quit ;<br>
&gt;&gt; done<br>
&gt;&gt;<br>
&gt;&gt; echo &quot;$TIME&quot; &gt;&gt; $LOG<br>
&gt;&gt; echo &quot;File following file were transfer to Pawnee&quot; &gt;&gt; $LOG<br>
&gt;&gt;<br>
&gt;&gt; for i in `cat /chroot/home/fl/fl_sdirc/files.txt` ; do<br>
&gt;&gt;   echo &quot;$i&quot; &gt;&gt; $LOG<br>
&gt;&gt; done<br>
&gt;&gt;<br>
&gt;&gt; for i in `cat /chroot/home/fl/fl_sdirc/files.txt` ;<br>
&gt;&gt;   mv $i /home/fl_sdirc/$i.$TIME ;<br>
&gt;&gt; done<br>
&gt;&gt;<br>
&gt;&gt; fi<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; ========================End Script==================================<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Terror PUP a.k.a<br>
&gt;&gt; Chuck &quot;PUP&quot; Payne<br>
&gt;&gt;<br>
&gt;&gt; <a href="tel:%28678%29%20636-9678" target="_blank">(678) 636-9678</a><br>
&gt;&gt; -----------------------------------------<br>
&gt;&gt; Discover it! Enjoy it! Share it! openSUSE Linux.<br>
&gt;&gt; -----------------------------------------<br>
&gt;&gt; openSUSE -- <a href="http://en.opensuse.org/User:Terrorpup" target="_blank">en.opensuse.org/User:Terrorpup</a><br>
&gt;&gt; openSUSE Ambassador/openSUSE Member<br>
&gt;&gt; Community Manager -- Southeast Linux Foundation (SELF)<br>
&gt;&gt; skype,twiiter,identica,friendfeed -- terrorpup<br>
&gt;&gt; freenode(irc) --terrorpup/lupinstein<br>
&gt;&gt; Register Linux Userid: 155363<br>
&gt;&gt;<br>
&gt;&gt; Have you tried SUSE Studio? Need to create a Live CD,  an app you want<br>
&gt;&gt; to package and distribute , or create your own linux distro. Give SUSE<br>
&gt;&gt; Studio a try. <a href="http://www.susestudio.com" target="_blank">www.susestudio.com</a>.<br>
&gt;&gt; See you at Southeast Linux Fest, June 7-9, 2013 in Charlotte, NC.<br>
&gt;&gt; <a href="http://www.southeastlinuxfest.org" target="_blank">www.southeastlinuxfest.org</a><br>
&gt;&gt; </p>
</div>
</div>
</div>
</div>
</div></div></div><div><div class="h5">
<p></p>
<p> </p>
<p> </p>
<p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">_______________________________________________<br>
&gt;&gt; Ale mailing list<br>
&gt;&gt; <a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; --<br>
&gt; James P. Kinney III<br>
&gt;<br>
&gt; Every time you stop a school, you will have to build a jail. What you gain<br>
&gt; at one end you lose at the other. It&#39;s like feeding a dog on his own tail.<br>
&gt; It won&#39;t fatten the dog.<br>
&gt; - Speech 11/23/1900 Mark Twain<br>
&gt;<br>
&gt; <a href="http://electjimkinney.org" target="_blank">http://electjimkinney.org</a><br>
&gt; <a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
Terror PUP a.k.a<br>
Chuck &quot;PUP&quot; Payne<br>
<br>
<a href="tel:%28678%29%20636-9678" target="_blank">(678) 636-9678</a><br>
-----------------------------------------<br>
Discover it! Enjoy it! Share it! openSUSE Linux.<br>
-----------------------------------------<br>
openSUSE -- <a href="http://en.opensuse.org/User:Terrorpup" target="_blank">en.opensuse.org/User:Terrorpup</a><br>
openSUSE Ambassador/openSUSE Member<br>
Community Manager -- Southeast Linux Foundation (SELF)<br>
skype,twiiter,identica,friendfeed -- terrorpup<br>
freenode(irc) --terrorpup/lupinstein<br>
Register Linux Userid: 155363<br>
<br>
Have you tried SUSE Studio? Need to create a Live CD,  an app you want<br>
to package and distribute , or create your own linux distro. Give SUSE<br>
Studio a try. <a href="http://www.susestudio.com" target="_blank">www.susestudio.com</a>.<br>
See you at Southeast Linux Fest, June 7-9, 2013 in Charlotte, NC.<br>
<a href="http://www.southeastlinuxfest.org" target="_blank">www.southeastlinuxfest.org</a><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br clear="all">
<br>
-- <br>
-- <br>
James P. Kinney III<br>
<i><br>
</i>Every time you stop a school, you will have to build a jail. What you gain at one end you lose at the other. It&#39;s like feeding a dog on his own tail. It won&#39;t fatten the dog.<br>
- Speech 11/23/1900 Mark Twain<br>
<i><br>
<a href="http://electjimkinney.org" target="_blank">http://electjimkinney.org</a><br>
<a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
</i><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><u></u><u></u></p>
</div>
</div>
<p></p>
<p><font face="Arial"><font color="fuchsia"><font style="FONT-FAMILY:Arial;FONT-SIZE:10pt"></font></font></font> </p>
<p> </p>
</div></div><p><font face="Arial"><font color="fuchsia"><font style="FONT-FAMILY:Arial;FONT-SIZE:10pt">Athena<font size="1">®</font>, Created for the Cause</font><font size="1">™
</font></font></font></p>
<p><font face="Arial">Making a Difference in the Fight Against Breast Cancer</font></p>
<p><font face="Arial"></font> </p>
<p><font face="Arial"></font> </p>
<p><font face="Arial"><font><b>How and Why I Should Support Bottled Water!<br>
</b>Do not relinquish your right to choose bottled water as a healthy alternative to beverages that contain sugar, calories, etc. Your support of bottled water will make a difference! Your signatures count! Go to
<a href="http://www.bottledwatermatters.org/luv-bottledwater-iframe/dswaters" target="_blank">http://www.bottledwatermatters.org/luv-bottledwater-iframe/dswaters</a> and sign a petition to support your right to always choose bottled water. Help fight federal and state issues,
 such as bottle deposits (or taxes) and organizations that want to ban the sale of bottled water. Support community curbside recycling programs. Support bottled water as a healthy way to maintain proper hydration. Our goal is 50,000 signatures. Share this petition
 with your friends and family today!</font></font></p>
<p><font face="Arial"></font> </p>
<p><span style="FONT-FAMILY:Arial;FONT-SIZE:10pt">---------------------------------<br>
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information
 is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.<br>
----------------------------------</span><span style="FONT-FAMILY:&#39;Courier New&#39;;FONT-SIZE:9pt"><u></u><u></u></span></p>
<p> </p>
<p></p>
<p></p>
</div>

<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i></i>Every time you stop a school, you will have to build a jail. What you 
        gain at one end you lose at the other. It&#39;s like feeding a dog on his 
        own tail. It won&#39;t fatten the dog.<br>

        - Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://electjimkinney.org" target="_blank">http://electjimkinney.org</a><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
</i></i></i></i>