curl-library
Re: libssh2 scp working?
Date: Mon, 16 Oct 2006 10:07:05 +0200 (CEST)
On Sun, 15 Oct 2006, James Housley wrote:
> I have done some modifications and have scp getting a file working. I know
> I have cleanup to do in configure.ac, but it works. I also started with
> sftp, but jumped to scp because it is simpler. Could I get a quick review
> of the direction I am headed in.
Okay, having applied and tested it somewhat I have a few comments on it. I
realize it is still fairly early, so ignore everything you think is too early
or beside the point for now!
No matter what, this is a good start to an even more powerful libcurl!
- When built, it doesn't seem to work for me to scp from my test server? So I
switched to try sftp instead and then I noticed that you have a wrong
assumption on the given URL:
I tried downloading this:
sftp://user:password@server/tmp/temp
(I have a 'temp' file in my tmp dir in the user's home directory)
and I got this error back:
Current remote directory: /home/user
== Info: Couldn't open file /tmp/temp
== Info: Closing connection #0
curl: (37) Couldn't open file /tmp/temp
... which indicates that you use the initial slash when creating the path,
while that should be used as a separator only! If I really wanted the root
tmp dir, I would use "//tmp/temp" or even "/%2etmp/temp". (The latter is the
way the RFCs dictate.)
And when I try sftp it seems it downloads something as the remote file is
619 bytes and I got to see:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 619 100 619 0 0 1048 0 --:--:-- --:--:-- --:--:-- 0
and it hung right there and when I presse control-c the local file was zero
bytes.
Let me know if you think I should debug this more in my end.
- configure needs some more work, but you did mention that. It
(wrongly) speaks of "openssh2" and you can remove the traces of USE_SSLEAY
that you converted to USE_SSH2EAY which is pointless.
- version info. You should make the version struct return a pointer with
libssh2 version info like the other libs do, and you should set a feature
flag that says it can do SCP/SFTP!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-10-16