From bogus@does.not.exist.com Tue Nov 18 19:30:09 2008 From: bogus@does.not.exist.com () Date: Wed, 19 Nov 2008 00:30:09 -0000 Subject: No subject Message-ID: Retrieving IOS running-config via scp=20 Posted by: daniel in Cisco=20 Ok, now I've only tested this with routers running IOS - it may be a little= different with Catalyst switches, since they store their config on flash, = rather than nvram. On the other hand, it may be exactly the same, since we'= re retrieving running-config, not startup-config.=20 First, you need to ensure that ssh and scp have been enabled. I strongly re= commend that you run ssh version 2.=20 ip ssh version 2=20 | ip scp server enable=20 Then, on your PC:=20 scp user at router-hostname:system:running-config .=20 You should then have a file called "running-config" in that directory. Pret= ty simple=E2=80=A6=20 If you want to grab the startup-config instead of the running-config, try:= =20 scp user at router-hostname:nvram:startup-config .=20 By using RSA keys to eliminate the password prompt at login, this method co= uld be expanded to form the basis of an automated config backup. I know tha= t various apps already exist, but a lot of them retrieve the config via "ex= pect" scripts, basically executing a "show run" and capturing the output.= =20 Another method of retrieving the config is via SNMP, however unless you're = using SNMP v3 with encryption, this method is potentially insecure.=20 This entry was posted on Thursday, July 31st, 2008 at 3:03 am and is filed = under Cisco .You can follow any responses to this entry through the RSS 2.0= feed. You can skip to the end and leave a response. Pinging is currently n= ot allowed.=20 |=20 | --=20 | There's a box?=20 |=20 | _______________________________________________ Trilug-ontopic mailing li= st Trilug-ontopic at trilug.org http://www.trilug.org/mailman/listinfo/trilug-= ontopic ------=_Part_81_4320467.1225323745128 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Times New Roman; font-size: 12pt; color: #000000'= >Here is something I used when I ran into issues with an ASA.

https= ://src-dst.com/index.php?/archives/18-Ciscocmd.html

I believe I use= d ssh as transport. If needed I have my scripts somewhere and I could verif= y.

Nick
----- "Scott Lambdin" wrote:
| From: "Scott Lambdin" <lopaki at gmail.com>
| To: "Technical di= scussion related to Linux and Open Source" <trilug-ontopic at trilug.org>= ;
| Sent: Wednesday, October 29, 2008 5:34:21 PM GMT -05:00 US/Canada Ea= stern
| Subject: Re: [Trilug-ontopic] Linux/Perl/Expect question
||
I saw where someone else was having trouble with getting just the s= how run output with expect.  Like this guy:  http://www.linuxforums.org/forum/linu= x-programming-scripting/117521-expect-creating-variables-fly.html
 
I'm not getting where the "useless info" is coming from.  Where is my old Cisc= o Rooter-on-a-eisa-card thingy I bought for $300 in the '90's? 
 
 
From http:/= /blog.pressure.net.nz/ this looks interesting:
 

Retrieving IOS running-config via scp

<= font color=3D"#777777" size=3D"2">Posted by:
daniel in Cisco=

Ok, now I've only tested this with routers running IOS - it may be a lit= tle different with Catalyst switches, since they store their config on flas= h, rather than nvram. On the other hand, it may be exactly the same, since = we're retrieving running-config, not startup-config.

First, you need to ensure that ssh and scp have been enabled. I strongly= recommend that you run ssh version 2.

ip ssh version 2
| ip scp server enable

Then, on your PC:

scp user at router-hostname:system:running-config .

You should then have a file called "running-config" in that directory. P= retty simple=E2=80=A6

If you want to grab the startup-config instead of the running-config, tr= y:

scp user at router-hostname:nvram:startup-config .

By using RSA keys to eliminate the password prompt at login, this method= could be expanded to form the basis of an automated config backup. I know = that various apps already exist, but a lot of them retrieve the config via = "expect" scripts, basically executing a "show run" and capturing the output= .

Another method of retrieving the config is via SNMP, however unless you'= re using SNMP v3 with encryption, this method is potentially insecure.


|
| --
| There's a box?
|

| _______________________________________________ Trilug-ontopic mailing list Trilug-ontopic at trilug.org http://www.trilug.org/mailman/listinfo/trilug-ontopic
------=_Part_81_4320467.1225323745128--