cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSH private key: how to specify account ?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 12 Mar 2008 10:02:52 -0700

On Wed, Mar 12, 2008 at 09:49:09AM +0000, Stephen Collyer wrote:
> If I'm using an SSH private key file, by setting
> CURLOPT_SSHKEY_PRIVATE_KEYFILE, how do I indicate the
> account with which this is associated ? Do I have to
> set CURLOPT_USERPWD to do this ? i.e.
>
> > curl_easy_setopt(curl_, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_PUBLICKEY);
> > curl_easy_setopt(curl_, CURLOPT_SSHKEY_PRIVATE_KEYFILE, ssh_keypath_);
> > curl_easy_setopt(curl_, CURLOPT_USERPWD, "fred:");
>
> Or am I confused ?

That should work. But don't forget to set CURLOPT_SSH_PUBLIC_KEYFILE as
well.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-03-12