Re: [foxboro] FTP
- From: Corey R Clingo <clingoc@xxxxxxxxxxxxx>
- To: foxboro@xxxxxxxxxxxxx
- Date: Mon, 14 Jan 2002 12:36:35 -0600
We do something similar, but we are transferring files to a box that does not
support the r-commands
(rcp, etc.) Try something like this, for sh/ksh shells:
#!/bin/ksh
# Need to have .netrc file to automate FTP, so we create one
cat <<E_O_F >$HOME/.netrc
machine blackhole
login captainkirk
password enterprise
macdef init
put /my/dir/path/myreport.txt /remote/dir/path/myreport.txt
bye
E_O_F
# .netrc can only be readable/writable by owner, or FTP will ignore it
chmod 700 $HOME/.netrc
ftp blackhole
rm $HOME/.netrc
# end script
There are also other freeware command-line FTP clients out there (e.g., wget,
ncftp) if you need more flexibility.
On a side note, the r-commands are generally considered insecure, and we are
looking to replace them
entirely with OpenSSH. Anyone out there done this successfully?
Corey Clingo
Sr. Engineer
BASF Corporation
pharizna@xxxxxxxxxxxxx on 01/14/2002 11:58:42 AM
Please respond to foxboro@xxxxxxxxxxxxx
To: Foxboro, foxboro
cc:
Subject: [foxboro] FTP
Hi:
I'd like to send a file from our IA to another one every day at noon, for
example.
I know that I can to use "cron" in order to automate the process but I don't
know how to make an FTP in "auto mode" (without human intervention).
Could you help me?
Regards
Pedro Hernandez
REPSOL YPF Quimica
pharizna@xxxxxxxxxxxxx
___________________________________________________________________
This list is neither sponsored nor endorsed by The Foxboro Company.
Use the information obtained here at your own risk. For disclaimer,
see http://www.thecassandraproject.org/disclaimer.html#maillist
list info: http://www.freelists.org/list/foxboro
subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
___________________________________________________________________
This list is neither sponsored nor endorsed by The Foxboro Company.
Use the information obtained here at your own risk. For disclaimer,
see http://www.thecassandraproject.org/disclaimer.html#maillist
list info: http://www.freelists.org/list/foxboro
subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
Other related posts: