> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Michael Wood
> Sent: Wednesday, October 14, 2009 6:12 PM
> To: libcurl development
> Subject: Re: libcurl and libssh2
>
> Well, your ssh-keygen seems to be different from mine. Maybe
> a different version. If I add that key to my known_hosts file, I get
> this:
>
> $ ssh-keygen -F 13.198.98.190 -l -f ~/.ssh/known_hosts
> # Host 13.198.98.190 found: line 71 type RSA
> 2048 0b:f2:d3:94:9d:0f:75:be:69:15:33:42:b8:0d:88:ca
> 13.198.98.190 (RSA)
>
> This is clearly different from your actual host key.
>
> Since ssh-keygen -l doesn't seem to work on your client
> machine you could also just check the actual keys directly.
> See if one of the other /etc/ssh/ssh_host*key.pub files
> matches. Maybe that is an SSH1 key in your known_hosts file?
>
> Can you connect using "ssh -2 13.198.98.190" without it
> asking to accept the host key?

Well, although something is wrong with my key file, it is not the root cause of the transfer failure. Just found that all the fuss is caused by a negligence on my side.

In testing for ftp, I used the command "./curl -v -u qxu:fair123 -T CMakeLists.txt ftp://13.198.98.202/scan/test.txt", and it works well. In testing for sftp, I still pointed the server to 13.198.98.202, and used the command "./curl -v -u qxu:fair123 -T CMakeLists.txt sftp://13.198.98.202/scan/test.txt". It doesn't work, coz 13.198.98.202 is ftp server, not sftp server. As soon as sftp server's IP address is filled in correctly, it works.

* Closing connection #0
=========================================================
Even something is wrong with the public key file, the connection is successful. After all, I am using user and password authentication. But, the upload fails when I specifies the relative remote folder (13.198.98.190/scan), and the upload succeeds when I uses the absolute remote path (13.198.98.190//home/qxu/scan).

It is strange, coz when I telnet into 13.198.98.190 with my account "qxu/fair123", the default path is my home directly (/home/qxu). So a relative path (scan) should work, shouldn't it? I am also using the relative path in ftp connection to 13.198.98.202 with curl, and it is successful.