cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: sftp Command Line help

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 15 Apr 2011 15:06:08 -0700

On Fri, Apr 15, 2011 at 04:46:28PM -0500, Young,Jim wrote:
> >I am trying to ftp a file via sftp protocol to a client:
>
> >curl -u username --key C:\cygwin\home\XJ0002T\.ssh\id_rsa --pubkey c:\cygwin\
> home\XJ0002T\.ssh\id_rsa.pub -
>
> >T c:\temp2\test4.txt sftp://server/SFTP/ --insecure
>
> >Enter host password for user 'XJ0002T':
>
> >Curl keeps asking me for a password. I have tried key pairs using OpenSSH and
> puttyGen, neither worked. Can someone tell me what I am doing wrong?
>
> As a starter, you could add the ?v option which will display some of the
> negotiation over how authentication is proceeding.
>
> Secondly ? are you trying to get it to authenticate without using a password?
> If so, does the server allow that? Is the server setup correctly with the
> public key in place so this works from a simple sftp client using the keys from
> your call line?

If use pass in a user name with -u but no password, curl will request a
password interactively before doing the transfer. Try setting a null
password by appending a colon to the user name "-u username:" See the example
for scp in curl --manual.

>>> Dan
-------------------------------------------------------------------
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-16