1
I'm struggling coming up with the right command to connect to a secure FTP server via port 22. When I'm connecting via Filezilla it works with username/pwd and port. After several attempts I ended up with this command that does not throw a port or command format error:
If I do curl -u <myuername>:<pwd> "sftp://datafeeds.shareasale.com:22/54291/54291.txt" -o "c:/temp/54291.csv"
I get error curl: (1) Protocol "sftp" not supported or disabled in libcurl
. I installed the latest binary from here: https://bintray.com/artifact/download/vszakats/generic/curl-7.60.0-win32-mingw.zip
But still it throws the same error, How can I add support/enable the SFTP protocol?
I already checked here: https://curl.haxx.se/mail/archive-2007-02/0070.html, https://curl.haxx.se/docs/manpage.html
Thanks! It's an issue with the path apparently that causes it to use an old version. Any idea how I can ensure a new version of curl is used without having to execute from that new directory? I don't see the old version that is being used in the path environment variable. – Flo – 2018-05-25T11:45:30.237
Creating an entry for the folder containing the new version of
curl
in your User PATH/System Path variables should be enough to overcome this, so long as that entry comes before any older one. So basically, create any new entry as the first entry in the list. In Windows 7, you can just edit it into the beginning of the variable (don't forget to separate entries with a semi-colon) and in Windows 10, you can move new entries to the top of the given environment variable list (with Move Up or Move Down). I would suggest rebooting afterwards to ensure Windows reloads the variables correctly. – Anaksunaman – 2018-05-25T12:27:14.8431If editing your variables isn't an option, you could also create a batch file that runs your basic
curl
command with a full path to the new version ofcurl.exe
and uses input from the command line when the batch file is run for specific things such as address links and output path. – Anaksunaman – 2018-05-25T12:36:30.763