cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: A question about using public key and private key for sftp authentication with libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 14 Oct 2010 14:17:43 +0200 (CEST)

On Wed, 13 Oct 2010, LIN Huangyang wrote:

> I'm using libcurl for sftp operations. But I find it strange that I have to
> set both public key and private key in order to pass authentication.

That's because the only API libssh2 provides requires this. It's actually more
or less a flaw in libssh2 but so far nobody has fixed it.

> Besides, could you tell me where I can get some example code for sftp
> operations. I think that will be a great help, since I don't even know how
> to write a callback for sftp. Thank you.

The callbacks libcurl supports are mostly protocol agnostic so you'd write
them the same for any other protocol. Just look at any example using the
callback you think of...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-14