No subject


Tue Jul 29 11:09:28 EDT 2008


 Retrieving IOS running-config via scp
<http://blog.pressure.net.nz/?p=3D15>Posted
by: daniel <http://blog.pressure.net.nz/?author=3D1> in
Cisco<http://blog.pressure.net.nz/?cat=3D2>

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.

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.
Pretty simple=85

If you want to grab the startup-config instead of the running-config, try:

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.

This entry was posted on Thursday, July 31st, 2008 at 3:03 am and is filed
under Cisco <http://blog.pressure.net.nz/?cat=3D2>.You can follow any
responses to this entry through the RSS
2.0<http://blog.pressure.net.nz/?feed=3Drss2&p=3D15>feed. You can skip
to the end <http://blog.pressure.net.nz/?p=3D15#respond> and leave a respon=
se.
Pinging is currently not allowed.


--=20
There's a box?

------=_Part_122846_26742690.1225316061819
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>I saw where someone else was having trouble with getting just the show=
 run output with expect.&nbsp; Like this guy:&nbsp; <a href=3D"http://www.l=
inuxforums.org/forum/linux-programming-scripting/117521-expect-creating-var=
iables-fly.html">http://www.linuxforums.org/forum/linux-programming-scripti=
ng/117521-expect-creating-variables-fly.html</a></div>

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

<div>&nbsp;</div>
<div>&nbsp;</div>
<div>From <a href=3D"http://blog.pressure.net.nz/">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">Retrieving IOS running-config via scp</a></h2><small><font color=3D"#777=
777" size=3D"2">Posted by: </font><a title=3D"Posts by daniel" href=3D"http=
://blog.pressure.net.nz/?author=3D1"><font color=3D"#ff9b2a" size=3D"2">dan=
iel</font></a><font color=3D"#777777" size=3D"2"> in </font><a title=3D"Vie=
w all posts in Cisco" href=3D"http://blog.pressure.net.nz/?cat=3D2" rel=3D"=
category"><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=85</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"><font color=3D"#ff9b2a" size=3D"2">Cisco</font></a><=
font size=3D"2">.You can follow any responses to this entry through the </f=
ont><a href=3D"http://blog.pressure.net.nz/?feed=3Drss2&amp;p=3D15"><font c=
olor=3D"#ff9b2a" size=3D"2">RSS 2.0</font></a><font size=3D"2"> feed. You c=
an </font><a href=3D"http://blog.pressure.net.nz/?p=3D15#respond"><font col=
or=3D"#ff9b2a" size=3D"2">skip to the end</font></a><font size=3D"2"> and l=
eave a response. Pinging is currently not allowed. </font></small></p>
</div><br><br>-- <br>There&#39;s a box?<br></div>

------=_Part_122846_26742690.1225316061819--


More information about the Trilug-ontopic mailing list