cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl scp bug? - Copying file from Cisco device

From: Mike Gibson <notmikegibson_at_gmail.com>
Date: Wed, 14 Aug 2013 19:17:00 +0000

Greetings,

I've written an app that SCPs files using libcurl. It works fine for
targets that are using common SSH implementations like OpenSSH, but when I
try to copy a file off a Cisco switch, I get an error.

Error from libcurl below:

curl: (79) Failed to recv file

I turned on scp debugging on the switch (debug ip scp). Every time I
request a file with my libcurl app, I get the following message on the
switch:

*Aug 14 17:54:19.283: SCP: [22 -> 192.168.2.13:37563] send -p -r -d options
not supported

This tells me that Cisco's scp implementation is limited, however I am able
to scp files off the switch with the scp command from OpenSSH.

For instance, this works fine:
scp user_at_192.168.2.2:bootflash:/cat4500-entservicesk9-mz.122-53.SG1.bin .

This doesn't:
curl --url scp://192.168.2.2:bootflash%3A/cat4500-entservicesk9-mz.122-53.SG1.bin
-u user --pass -k -v

Using curl, the SSH CONNECT phase completes, then reports "curl: (79)
Failed to recv file".

I'm wondering, what is curl doing that the scp command isn't that is
causing this? And how can I turn it off programmatically?

Any help is appreciated.

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