No subject


Tue Nov 18 19:30:09 EST 2008


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

<html><head><style type=3D'text/css'>p { margin: 0; }</style></head><body><=
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. <br><br>https=
://src-dst.com/index.php?/archives/18-Ciscocmd.html <br><br>I believe I use=
d ssh as transport. If needed I have my scripts somewhere and I could verif=
y.<br><br>Nick<br>----- "Scott Lambdin" <lopaki at gmail.com> wrote:
<br>| From: "Scott Lambdin" &lt;lopaki at gmail.com&gt;<br>| To: "Technical di=
scussion related to Linux and Open Source" &lt;trilug-ontopic at trilug.org&gt=
;<br>| Sent: Wednesday, October 29, 2008 5:34:21 PM GMT -05:00 US/Canada Ea=
stern<br>| Subject: Re: [Trilug-ontopic] Linux/Perl/Expect question<br>|<br=
>| <div>I saw where someone else was having trouble with getting just the s=
how run output with expect.&nbsp; Like this guy:&nbsp; <a href=3D"http://ww=
w.linuxforums.org/forum/linux-programming-scripting/117521-expect-creating-=
variables-fly.html" target=3D"_blank">http://www.linuxforums.org/forum/linu=
x-programming-scripting/117521-expect-creating-variables-fly.html</a></div>

<div>&nbsp;</div>
<div>I'm not getting where the "<font color=3D"#ff0000">useless info" </fon=
t><font color=3D"#000000">is coming from.&nbsp; </font>Where is my old Cisc=
o Rooter-on-a-eisa-card thingy I bought for $300 in the '90's?&nbsp; </div>

<div>&nbsp;</div>
<div>&nbsp;</div>
<div>From <a href=3D"http://blog.pressure.net.nz/" target=3D"_blank">http:/=
/blog.pressure.net.nz/</a>&nbsp;this looks interesting:</div>
<div>&nbsp;</div>
<div>
<h2 class=3D"posttitle"><a title=3D"Permanent Link: Retrieving IOS running-=
config via scp" href=3D"http://blog.pressure.net.nz/?p=3D15" rel=3D"bookmar=
k" target=3D"_blank">Retrieving IOS running-config via scp</a></h2><small><=
font color=3D"#777777" size=3D"2">Posted by: </font><a title=3D"Posts by da=
niel" href=3D"http://blog.pressure.net.nz/?author=3D1" target=3D"_blank"><f=
ont color=3D"#ff9b2a" size=3D"2">daniel</font></a><font color=3D"#777777" s=
ize=3D"2"> in </font><a title=3D"View all posts in Cisco" href=3D"http://bl=
og.pressure.net.nz/?cat=3D2" rel=3D"category" target=3D"_blank"><font color=
=3D"#ff9b2a" size=3D"2">Cisco</font></a><font color=3D"#777777" size=3D"2">=
 </font></small>
<div class=3D"entry">
<p>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.</p>

<p>First, you need to ensure that ssh and scp have been enabled. I strongly=
 recommend that you run ssh version 2.</p>
<blockquote>
<p>ip ssh version 2<br>| ip scp server enable</p></blockquote>
<p>Then, on your PC:</p>
<blockquote>
<p>scp user at router-hostname:system:running-config .</p></blockquote>
<p>You should then have a file called "running-config" in that directory. P=
retty simple=E2=80=A6</p>
<p>If you want to grab the startup-config instead of the running-config, tr=
y:</p>
<blockquote>
<p>scp user at router-hostname:nvram:startup-config .</p></blockquote>
<p>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=
.</p>

<p>Another method of retrieving the config is via SNMP, however unless you'=
re using SNMP v3 with encryption, this method is potentially insecure.</p>
<p class=3D"postmetadata alt clear"><small><font size=3D"2">This entry was =
posted on Thursday, July 31st, 2008 at 3:03 am and is filed under </font><a=
 title=3D"View all posts in Cisco" href=3D"http://blog.pressure.net.nz/?cat=
=3D2" rel=3D"category" target=3D"_blank"><font color=3D"#ff9b2a" size=3D"2"=
>Cisco</font></a><font size=3D"2">.You can follow any responses to this ent=
ry through the </font><a href=3D"http://blog.pressure.net.nz/?feed=3Drss2&a=
mp;p=3D15" target=3D"_blank"><font color=3D"#ff9b2a" size=3D"2">RSS 2.0</fo=
nt></a><font size=3D"2"> feed. You can </font><a href=3D"http://blog.pressu=
re.net.nz/?p=3D15#respond" target=3D"_blank"><font color=3D"#ff9b2a" size=
=3D"2">skip to the end</font></a><font size=3D"2"> and leave a response. Pi=
nging is currently not allowed. </font></small></p>
</div><br>| <br>| -- <br>| There's a box?<br>| </div>
<br>| _______________________________________________
Trilug-ontopic mailing list
Trilug-ontopic at trilug.org
http://www.trilug.org/mailman/listinfo/trilug-ontopic
</lopaki at gmail.com></div></body></html>
------=_Part_81_4320467.1225323745128--


More information about the Trilug-ontopic mailing list