cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sftp with password+public Key

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 8 Sep 2010 23:44:54 +0200 (CEST)

On Sat, 4 Sep 2010, Venkatrangan G - ERS, HCL Tech wrote:

> I generated the keypair using PuttyGen, then used them in windows and
> connected to sftp server using winscp. Everything seems to work fine. Then I
> had troubles with libcurl example code from linux. So, I used ssh-keygen to
> convert public key to openssh format and used puttygen in linux to convert
> the private key also to openssh format.

So does the key work with plain openssh?

> Still the operation from linux fails with "Wrong Public Key or
> username/password combination". Where am I going wrong. I am using the
> latest libssh2 and latest release of curl.

What does the sshd server log say?

It would perhaps help if you rebuild libcurl and enable libssh2 trace
debugging (which requires that you built libssh2 with debug enabled).

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-08