replacing FTP with SFTP

I realize this is a bit off topic from AppleScript, but any help would be appreciated…

A few years ago, I wrote an AppleScript droplet that would FTP any files dropped onto it to a preset directory on our production system. At the heart of the script was the UNIX shell command “curl” that did the actual work of FTPing the files. The script is run by around 80 users and has served the workflow very well.

the curl command used this syntax:

curl --upload-file ‘thefile.jpg’ theserver.company.com --user username:password --write-out %{size_upload} --quote -quit

Now we are upgrading our production system, and the upgrade requires us to use SFTP instead of FTP, so I am searching for a solution as clean as using the curl command. I know some of you are getting ready to fire off a one line response to this post like “Use a certificate.”

To use the curl command, the machines have to have exchanged certificates. Since we will need to support this script on around 80 machines, and we have at least 4 servers (main/backup and offsite main/backup) the task of keeping hundreds of certificates in order is just not practical.

So, does anyone know of a unix command that comes standard on OS X that allows you to SFTP with only the name and PW combination? I know some scriptable commercial products are out that would do SFTP with just a name and PW, but would like to do this without any software dependencies.

Thank you.

Don

I am also looking for the same exact solution in regards to uploading files to an sftp. Did you ever find a solution that using applescript that passes the username and password? If so, could please provide a sample script?