curl / Mailing Lists / curl-library / Single Mail


Re: sftp fails with LIBSSH2_ERROR_SOCKET_RECV

From: Daniel Stenberg via curl-library <>
Date: Wed, 7 Nov 2018 12:14:05 +0100 (CET)

On Wed, 7 Nov 2018, Shane de Deuge via curl-library wrote:

> When attempting to connect to an sftp server it returns immediately with:
> curl: (2) Failure establishing ssh session
> Some further investigation reveals that libssh2 is returning with error -43

The easiest way to track this down is to switch over to using libssh2

Build a debug-version of libssh2, run an example app using plain libssh2 and
see what the libssh2 debug messages say.

If you're using a modern SSH server it isn't unthinkable that your libssh2
version just can't negoatiate a connection with it. You might need libssh2 git
master (or the pending next release, whenever that is...).

Received on 2018-11-07