curl / Mailing Lists / curl-library / Single Mail

curl-library

SCP to Cisco device

From: Martin Galvan <omgalvan.86_at_gmail.com>
Date: Tue, 3 Jul 2018 17:28:07 -0300

Hi all,

I have a Cisco switch that I'm trying to copy files from through SCP.
While I'm using libcurl, essentially what I'm doing is:

curl -v scp://cisco/flash:/someFile -u user:pass -k

The output is:

* TCP_NODELAY set
* Connected to 172.16.0.190 (172.16.0.190) port 22 (#0)
* SSH MD5 fingerprint: dcabc9f67a498c9faafdc7cfe5673274
* SSH authentication methods available: keyboard-interactive,password
* Initialized password authentication
* Authentication complete
* SSH CONNECT phase done
* Failed to recv file
* Connection #0 to host 172.16.0.190 left intact
curl: (78) Failed to recv file

Using regular SCP works fine. However, the switch's SSH implementation
is ancient, and I have to pass
-oKexAlgorithms=+diffie-hellman-group1-sha1 to scp for the connection
to work. I don't think this is the problem, though, because of the
"SSH CONNECT phase done" message.

I saw that Mike Gibson was having this same problem back in 2013. It
looks like his issue was on the -p option used by libssh2:

https://curl.haxx.se/mail/lib-2013-08/0125.html

However, he didn't post any updates. Doing scp -p doesn't work (I get
an error saying "-p -r -d options not supported"), so maybe I'm having
the same issue as he did. The switch isn't showing any logs related to
SCP as Mike's did, though.

From that thread, the solution seems to be to somehow make
curl/libcurl not use -p. How can I do this?
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-07-03