SFTP using cURL

I’ve been beating my head on the keyboard now for hours now and my head hurts and i need a new keyboard and still can’t get this to work


set afile to choose file
set curl to "curl -T " & quoted form of POSIX path of afile & " -u username:password sftp://someurl.com"
do shell script curl

this is suppose to upload my afile but errors with "curl: (1) libcurl was built without LIBSSH2, scp: not supported!
"

please help

I’m trying to do the same thing, and getting the same error. Did you ever find a solution or another method for automated SFTP?

I had to resort to using cyberduck which I don’t like as much because I wanted it to be seamless now the user has to see the script run rather than it just run in the background.

I think the deal is that there are different installs of curl one that supports sftp and one that doesn’t and apple decided on the later :frowning: I think I could just reinstall curl but thats a bit beyond my scale of comfortable.

mm

You could compile your own copy, or you could use MacPorts instead. With MacPorts, you would just need to type:

sudo port install curl +sftp_scp

thank you bruce I will try that !

mm