curl-library
Re: How to get file size over SFTP? And use private key with passphrase?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 22 Sep 2009 00:50:04 +0200 (CEST)
Date: Tue, 22 Sep 2009 00:50:04 +0200 (CEST)
On Mon, 21 Sep 2009, Gary V. Vaughan wrote:
> So, the only transport layer agnostic way to get the size of a remote file
> is to start downloading it, but use a progress callback that always aborts?
Yes, I believe that's the only working way for SFTP atm.
> pycurl.SSLKEYPASSWD: 'rsa key passphrase',
> pycurl.SSH_PRIVATE_KEYFILE: privatekey,
> pycurl.SSH_PUBLIC_KEYFILE: privatekey + '.pub',
I just checked the code, and the above looks right.
> * SSH public key authentication failed: Unable to initialize private key
> from file
And this is a sign that the passphrase wasn't considered fine by libssh2.
-- / daniel.haxx.seReceived on 2009-09-22