2

I can successfully programmatically download the config from Juniper network devices using SCP - I'd like to do the same for a Cisco router.

SSH access is already working, and I've enabled SCP using ip scp server enable. Problem is that I don't know the name or location of the file I need to download, and GUI tools like WinSCP don't seem to work (complains that I need a BASH shell).

Is this possible for Cisco devices?

2 Answers 2

4

scp <user>@<router>:startup-config (or running-config)

Or the full pathname of whatever file you want, like nvram:/startup-config.

[there's also the CONFIG-COPY-MIB to initiate a copy by SNMP. It's come up many times before, so go here]

3
  • Your scp command does work with the scp executable, but I'm trying to do this programmatically. I can open an scp connection and send commands, such as scp -f my_filename, but the Cisco SCP server always says it can't find the file when I try anything like system:running-config. Not sure if some alternative syntax is required or what. The SNMP stuff is also helpful, I'll look into that too Commented May 27, 2015 at 12:05
  • That's an issue with your SSH client. Perhaps it's trying sftp instead of scp? Commented May 27, 2015 at 14:13
  • I'm using Cisco IOS 12.4, which I don't think supports SFTP? Commented May 28, 2015 at 9:50
2

I finally figured it out - I was quoting the filename, which seems to work just fine for other devices, such as Juniper devices, but not for Cisco IOS.

I was doing this:

scp -f "system:running-config"

But this is what works:

scp -f system:running-config

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.