cURL / Mailing Lists / curl-library / Single Mail


RE: Why curleasy do nothing for SFTP

From: Daniel Stenberg <>
Date: Mon, 20 Aug 2007 15:59:40 +0200 (CEST)

On Sun, 19 Aug 2007, Mathew Simon wrote:

> The "sftp_nonblock.c" or the other example programs of LIBSSH2 are not
> meant for the Mingw32 platforms. But after some tinkering I was able to
> compile the "sftp_nonblock.c" under Mingw32 and execute it.

Please submit your sftp_nonblock.c fixes as a patch to the libssh2-devel
mailing list.

> Using the "sftp_nonblock.c", I was able to log-in to the sshd server using
> password authentication, and to me it is very good progress compared to what
> the LIBCURL is able to achieve.

Indeed, then we know the problem is not really in libssh2!

> I tried my best with curleasy, by using different setopts options, to get it
> login-in to the sshd server. It conveys the user name to the sshd server,
> since the sshd server is getting ready to authenticate that user. But
> somehow the authentication do not take place, and the connection is dropped
> by the client. Is the password not getting passed to the sshd server? I
> tried the key-board authentication in the setopt, and I don't get any action
> either. That is, it is not asking me to key-in the password.

libcurl has no password prompting so if you don't provide the password to
libcurl, it won't have any to pass on to libssh2.

> I couldn't trace into LIBCURL since I didn't compile LIBCURL and LIBSSH2
> with the debug option. Even if I manage to create a debugging compilation of
> these libraries, my debugger will fail on non-native windows code.

Uhm, why wouldn't they be using native windows code? You build them on windows
for windows == native windows.

If you can't use a debugger on the code, it certainly will be hard to debug

I'll try to do some real-world libcurl tests with sftp soon. What sshd/sftp
server and version are you running this against? Are you seeing this problem
on more than one server? I mean, does it ever work for you?

  Commercial curl and libcurl Technical Support:
Received on 2007-08-20