Glam Prestige Journal

Bright entertainment trends with youth appeal.

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:
But still it throws the same error, How can I add support/enable the SFTP protocol?

I already checked here: ,

1 Answer

How can I add support for/enable the SFTP protocol?

It is already enabled (at least with the curl.exe binary you linked to). If you run curl -V in the bin directory of your extracted zip file, you will see that sftp support is one of the build options included in the version banner.

VZ Curl Build ScreenShot

I get an error - curl: (1) Protocol "sftp" not supported or disabled in libcurl.

As is, it's difficult to say exactly what the real issue might be, but one of three possibilities seems likely:

  • You are not actually using the version of curl you think you are. I would do curl -V from e.g. your desktop and see if sftp support was still listed in the banner. I would also do where curl to get a better idea of which curl.exe files are registered in your environment paths.

  • You may have a spelling error (e.g. " sftp" where there is an unintentional space before "sftp") or another problem with the URL you are accessing.

  • There is an issue with the server or its configuration.

Regarding general troubleshooting, I would run your curl command from the bin folder of your unzipped file. This way, there should be no issues with paths.

Finally, as a small note, the :22 is likely unnecessary — sftp runs on port 22 by default. The only reason to specify a port in this case is if the connection isn't going to be on port 22. That said, I would double-check the server port regardless (i.e. make certain is isn't using port 23 or 24, for example).

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy