cURL / Mailing Lists / curl-users / Single Mail

curl-users

Can't connect to a SFTP site using private key

From: Yura Kaidalov <kaidalov_at_gmail.com>
Date: Thu, 19 Apr 2012 10:52:15 +0300

Hello

I'm trying to connect to a SFTP site using private key, however command
fails. Here's command itself and cURL output:
curl.exe --key privatekey.ppk sftp://uname@hostname/~ -v
* About to connect() to hostname port 22 (#0)
* Trying XX.XX.XX.XX... connected
* SSH authentication methods available:
publickey,gssapi-keyex,gssapi-with-mic,password
* Using ssh public key file id_dsa.pub
* Using ssh private key file privatekey.ppk
* SSH public key authentication failed: Unable to open public key file
* Authentication failure
* Closing connection #0
curl: (67) Authentication failure

The command works only when I specify both public and private keys. However
as far as I know, it should be enough to have only one key for successful
connection (at least I was able to connect to the host with private key only
using another sftp client).

Here's my questions: is there are any way to connect to a host using private
key only? And why does curl needs both public and private keys to make a
connection?

Thanks,
Yuri

-------------------------------------------------------------------
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-04-19