No subject


Tue Jul 29 11:09:28 EDT 2008


have on the network, including perimeter devices (i.e. thorugh the
firewall).  I need to back up the running configurations and make regular
little txt files out of them.  All the devices I need to back up are Cisco
devices running IOS.  Easy enough.  But the one thing I'm NOT able to do is
issue a standard 'copy run scp/tftp/ftp' as the firewall will block any
inbound new connections.

Changing the firewalls rules to make this work is impossibe.

So since I'm able to ssh to the devices I should, and am able, to use the
'spawn ssh' command in expect to reach all the devices.  Now, the question
is, how I do "read" the results of 'show run' back into the perl script that
has already launched the expect script?  I'm looking around for examples (as
well as checking my book) and I haven't found anything just yet.

I suppose it's more of an expect script.  All my existing expect script just
run commands based on values returned - and they all run totally in expect.
How do I launch the perl script and then read back from the expect script
ONLY the results of the 'show run' command?

I'm sure someone has done this already.  If you have or know easily how to
make this work can you send me a code snippet?  I'd be very grateful.

Thx

Greg

------=_Part_89566_14982968.1225307459701
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I have a linux box with a plain perl installation (expect is there too).&nbsp; I am NOT able to make any changes to the software and am not able to add any modules.&nbsp; It&#39;s just that way.&nbsp; I can&#39;t change it and have to live with it.<br>
<br>From the linux boxI am able to ssh, from the command line, to any device I have on the network, including perimeter devices (i.e. thorugh the firewall).&nbsp; I need to back up the running configurations and make regular little txt files out of them.&nbsp; All the devices I need to back up are Cisco devices running IOS.&nbsp; Easy enough.&nbsp; But the one thing I&#39;m NOT able to do is issue a standard &#39;copy run scp/tftp/ftp&#39; as the firewall will block any inbound new connections.<br>
<br>Changing the firewalls rules to make this work is impossibe.&nbsp; <br><br>So since I&#39;m able to ssh to the devices I should, and am able, to use the &#39;spawn ssh&#39; command in expect to reach all the devices.&nbsp; Now, the question is, how I do &quot;read&quot; the results of &#39;show run&#39; back into the perl script that has already launched the expect script?&nbsp; I&#39;m looking around for examples (as well as checking my book) and I haven&#39;t found anything just yet.&nbsp; <br>
<br>I suppose it&#39;s more of an expect script.&nbsp; All my existing expect script just run commands based on values returned - and they all run totally in expect.&nbsp; How do I launch the perl script and then read back from the expect script ONLY the results of the &#39;show run&#39; command?<br>
<br>I&#39;m sure someone has done this already.&nbsp; If you have or know easily how to make this work can you send me a code snippet?&nbsp; I&#39;d be very grateful.<br><br>Thx<br><br>Greg<br>

------=_Part_89566_14982968.1225307459701--


More information about the Trilug-ontopic mailing list