cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: sftp Command Line help

From: Michael Lam <Michael.Lam_at_silkroad.com>
Date: Mon, 18 Apr 2011 12:55:37 -0400

I guess what I don't understand is why I have to specify the location of the public key locally and not on the server. I tried to specify the location on the server but always got the error "cannot open file"

Daniel Stenberg <daniel_at_haxx.se> wrote:

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 _rsa.pub -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!

--
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-18