cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Why curleasy do nothing for SFTP

From: Mathew Simon <msimon_at_simdol.com>
Date: Mon, 20 Aug 2007 12:18:59 -0500

Daniel,

>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?

Thank you. After some more tinkering with the "sftp_nonblock.c", I am
able to transfer files from the sshd server. Hence, it is certain that
the problem is not within libssh2. The sshd sever is also working well
since I am able to do SFTP with another windows based client called
"WinSCP" and everything work fine when I use this "WinSCP" client.

The sshd server I am using to test with is Openssh 4.2, and it is on
Linux (Fedora Core-4). I also tried to test my software against a major
company's production sshd and my software fail in the same way as it
fail with my test sshd sever. I do not know what kind of sshd server
they use and it being their production server I don't want to do anymore
testing with it until this problem get fixed against my sshd test server
(Openssh 4.2).

Thanks,
Mathew Simon

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Monday, August 20, 2007 9:00 AM
To: libcurl development
Subject: RE: Why curleasy do nothing for SFTP

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
it.

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:
http://haxx.se/curl.html
Received on 2007-08-20