cURL / Mailing Lists / curl-users / Single Mail

curl-users

SFTP: public key authentication failed

From: Vinicius Massuchetto <viniciusmassuchetto_at_gmail.com>
Date: Wed, 11 Jul 2012 09:24:04 -0300

Hi!

I'm having some trouble connecting to a server via SFTP authenticated
by a public key. I can successfully connect doing:

    ssh user_at_host
    sftp user_at_host

But when I try running:

    curl -v --user <user>: -# -T <file> sftp://<host>/<path>/<file>

I get this output:

    * About to connect() to <host> port 22 (#0)
    * Trying <ip>... connected
    * SSH host check: 0, key: <key>
    * SSH authentication methods available: publickey,password
    * Using ssh public key file /home/<myuser>/.ssh/id_dsa.pub
    * Using ssh private key file /home/<myuser>/.ssh/id_dsa
    * SSH public key authentication failed: Unable to open public key file
    * Authentication failure
    * Closing connection #0

What can be the issue?
Please let me know if I can provide more information.

Thanks!

--
Vinicius Massuchetto
-------------------------------------------------------------------
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 2012-07-11