Re: Help, using script to edit router config (entering different modes automatically)
- From: bjorge.solli@xxxxxxxx (Bjorge Solli)
- Date: Fri, 27 Oct 2006 09:32:06 +0200
On Friday 27 October 2006 09:23, Michael Alipio wrote:
Hi,
Suppose I have an appliance, it's not cisco but the process of updating
configuration is almost the same.
1. First you log-in either via ssh or telnet..
2. Then you go into a certain mode by typing a particular command.
3. Only after you have enter that mode, you can issue the actual editing
command, (e.g; set ip 192.168.1.1) 4. Finally, issue another command to
apply the configuration change.
I need to execute these steps on a regular basis via cron.
Step 1 is not a problem I guess because I have discovered that the
appliance supports ssh public/private key authentication. Step 2 is also
not a problem since I can execute it together with the command I use in
step 1,
ssh appliance.our.domain "conf t"
Now, what? I don't know what to do next. Any idea?
Tried Net::SSH::Perl?
http://search.cpan.org/~dbrobins/Net-SSH-Perl-1.30/lib/Net/SSH/Perl.pm
You can send multiple commands separately with that.
--
Bjørge Solli - Office:+47 55205847
Mohn-Sverdrupsenteret, Nansensenteret, Høyteknologisenteret T47
Thormöhlensgate 47, 5006 Bergen, Norway - www.nersc.no
Google Earth: www.nersc.no/GE - TOPAZ: topaz.nersc.no
.
- Prev by Date: Re: Sample https:// login script
- Next by Date: Re: How to parse UNIX commands ...
- Previous by thread: how to read and process data coming on console
- Next by thread: killing processes
- Index(es):
Relevant Pages
|