cURL / Mailing Lists / curl-users / Single Mail


RE: sftp Command Line help

From: Daniel Stenberg <>
Date: Mon, 18 Apr 2011 09:41:55 +0200 (CEST)

On Mon, 18 Apr 2011, Michael Lam wrote:

> curl -v -u mlam: --key C:/cygwin/home/mlam/.ssh/id_rsa --pubkey
> c:/cygwin/home/mlam/.ssh/id -T c:\temp2\test4.txt
> sftp://servername/var/SFTP/test10.txt --insecure
> The --pubkey option puzzles me since I thought the SFTP server can
> automatically located the public key on the server based on the username, as
> the public key is located in the folder /home/mlam/.ssh.

I'm glad you made it work!

Figuring out the public key is not the job of the server, it is the job of the
client to pass that on to the server.

With curl we have to point that out like this due to deficiancies in the
underlying libssh2 library. It is possible to deduct the public one from the
private one, and libssh2 has gotten that ability recently but we haven't yet
made libcurl able to use that functionality - and perhaps you're not even
using such a new libssh2 that would be able to.

Patches are of course always welcome!

List admin:
Received on 2011-04-18