Hi,
Unfortunately you won't find too much on this. We encountered this problem at my work and this is what I came up with. (Again "correct" solution depends on what your needs are)
PROBLEM: Need to transfer files via FTP from a machine A to another (machine B) using SSH protocols.
SOLUTION:
Created an FTP script to grab all the files to a local directory.
I assume you don't need this part since you
must already have the file local.
Created a combination ksh/autoexpect script using SCP as the SSH transfer program to put the files on the server.
When you use SSH/SCP/SFTP you unless you have
"authentication" protocols set correctly you will
always be asked to enter a password/username.
The autoexpect language basically replays the keystrokes
you enter on the terminal. The autoexpect script then
basically is executing the following command:
scp *.dat machinename:/target_dir
but when the server asks for a password the autoexpect
script will feed the password in too.
If you don't need to use SSH type transfers/connections, I suggest a simple FTP script instead. It's less secure but if you are in a trusted environment it may be the way to go.