cURL / Mailing Lists / curl-library / Single Mail


Re: curllib and SFTP

From: Daniel Stenberg <>
Date: Wed, 24 Feb 2016 14:48:31 +0100 (CET)

On Wed, 24 Feb 2016, Jeanne Vural wrote:

> Other developers have used curl to transfer using FTP so I know the curllib
> is functioning in our environment.

SFTP is a completely different protocol than FTP though.

> I want to use SFTP and I mimicked their syntax. It is not successful and I
> get a WIN_STATUS of 1 back.


> I assumed I should be using the delivered cert...

SFTP doesn't use certificates at all, so no.

> curl -v -cacert

The --cacart option is used with two dashes, but it is for TLS based protocols
and SFTP is not one of those.

> -F

This is for HTTP(S). It does nothing good for SFTP.

> "username=<username>" -F "password=<password>"

You specify username and password with -u.

To upload a file over SFTP, you use "-T filename".

List admin:
Received on 2016-02-24