cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl Library asking for key authentication when it shouldn't?

From: Saqib Ali <saqib.ali.75_at_gmail.com>
Date: Fri, 18 Feb 2011 01:24:50 -0500

Thanks Brad, I got the answer I was looking for from your comment about the
permissions. I was sending a file via SCP. I (wrongly) assumed that by
default, it would put it into the remote user's home directory -- just like
SCP does from the command line if you don't specify a target path. Turns out
I needed to explicitly give the entire path.

- Saqib

On Thu, Feb 17, 2011 at 5:50 PM, Brad Hards <bradh_at_frogmouth.net> wrote:

> This is not really anything specific to curl. Its the ssh server on your
> machine.
>
> On Friday, February 18, 2011 09:34:20 am Saqib Ali wrote:
> > Additionally, the directory /home/sali/.ssh/ only contains one file:
> > known_hosts. Each line in this file contains what looks like an RSA key
> > (the string directly after the IP address == "ssh-rsa")
> Its the public key for the server, so you can recognise that the server
> isn't
> being impersonated.
>
> > So how can I tell libcurl to use RSA keys instead of DSA keys? And
> > shouldn't the keys be irrelevant if I'm providing a username/password?
> This is different to the authentication mechanism.
>
> > > <http://www.gtkforums.com/about4193.html>
> > > * About to connect() to 127.0.0.1 port 22 (#0)
> > > * Trying 127.0.0.1... * connected
> > > * Connected to 127.0.0.1 (127.0.0.1) port 22 (#0)
> > > * SSH authentication methods available:
> > > gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive
> This line tells you that the ssh server accepts multiple authentication
> methods (e.g. GSSAPI key exchange, Public Key, Password).
>
> > > * Using ssh public key file /home/sali/.ssh/id_dsa.pub
> > > * Using ssh private key file /home/sali/.ssh/id_dsa
> > > * SSH public key authentication failed: Unable to open public key file
> The server asked for public key before password, so curl tries that.
>
> > > * Initialized password authentication
> > > * Authentication complete
> This looks like the password worked.
>
> > > * Upload failed: Permission denied (3/-31)
> > > * Connection #0 to host 127.0.0.1 left intact
> > > * Access denied to remote resource
> At a guess, you are uploading to a file location you don't have permission
> to
> write to (e.g. the root directory on the server).
>
> You might understand this more if you try doing it with scp, and turning on
> the verbose options. Reading the man page for scp and your ssh server might
> also be useful.
>
> Brad
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-18