Date: Sun, 26 Aug 2001 10:28:23 -0500 From: jacks@sage-american.com To: freebsd-questions@freebsd.org Subject: FTP Auto-Send Need Message-ID: <3.0.5.32.20010826102823.01151810@mail.sage-american.com>
next in thread | raw e-mail | index | archive | help
I have an FTP question that is probably simple for some, but is maddening for me since I have yet to get an FTP command (and a script) to work properly. I have read/reread "man ftp", but no solution yet. Here is the problem: Here is the simple process needed: #ftp ftp.remotehost.com #auto-login (useracct/userpasswd) #cd /remote.dir #put myoutfile #bye #finished That's all I need to do....!!!! This needs to run unattended through cron or from within a script. By configuring the ".netrc" file, I can auto-logon to the remote host in anonymous mode, but not to the user account. Further, I would need to "cd" to the "incoming" directory to upload anyway. Also, when the cron job issues the command to "ftp ftp.remote.com", it WILL login anonymously and then just sits there without continuing to run the local script calling for a "cd" and upload of "myoutfile". So, no upload of "myoutfile" is possible without some sort of script than continues the process. Now, here is my ".netrc" file: ************************** machine ftp.remotehost.com anonymous macdef (nothing in here yet) ************************** I've tried this instead to go in as user account: ************************** machine remotehost.com (and tried "ftp.remotehost.com) mypasswd macdef (nothing in here yet) ************************** That second "netrc" config tells me to go away, ....others can see my password!!!!! Also, I assume the "macdef" means "macro definition" (wild guess) and there is where I may need a macro to run to finish the upload.... or a command line would be used to call the macro to issue the whole thing. I had some help on this from "Edwin" of this list, but am still struggling... any others that can lend a hand on this to give more clarification? I just want to find a way to send that darn file back to the remote. Thanks in advance for any ideas that my thick head can understand..... Best regards, Jack L. Stone, Server Admin Sage-American http://www.sage-american.com jacks@sage-american.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20010826102823.01151810>