cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: connecting to sftp where server is not trusted yet

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sun, 16 Oct 2016 21:45:12 +0200

On Fri, Oct 14, 2016 at 07:39:07AM +0200, Miro Janosik wrote:
> > From: Dan Fandrich <dan_at_coneharvesters.com>
> > > I'm missing some functions that would return me the server's host key so I
> > > could compare it to my local key; and then approving the server that it is ok
> > > to connect.
> >
> > curl will do this for you when you set CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
>
> Okay, it will do it for me, but how will I get the information if the
> server's key has changed (something like the message 'key is unknown,
> do you agree to proceed')? I mean if server's key has changed/is
> unknown then user should approve the connection, right?

libcurl will return an error code in this case. It's up to the application to
deal with that error appropriately.

>>> Dan
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-10-16