RE: Help, using script to edit router config (entering different modes automatically)
- From: mgargiullo@xxxxxxxxx (Michael Gargiullo)
- Date: Thu, 25 Jan 2007 09:43:44 -0500
-----Original Message-----
From: zackrspv [mailto:oldoak@xxxxxxxxx]
Sent: Wednesday, January 24, 2007 11:55 PM
To: Bjorge Solli
Subject: Re: Help, using script to edit router config (entering
different modes automatically)
On Oct 27 2006, 1:32 am, bjorge.so...@xxxxxxxx (Bjorge Solli) wrote:
On Friday 27 October 2006 09:23, Michael Alipio wrote:updating
Hi,
Suppose I have an appliance, it's not cisco but the process of
editingconfiguration is almost the same.
1. First you log-in either viasshor 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
tocommand, (e.g; set ip 192.168.1.1) 4. Finally, issue another command
alsoapply 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 supportssshpublic/private key authentication. Step 2 is
innot a problem since I can execute it together with the command I use
Net::SSH::Perl?http://search.cpan.org/~dbrobins/Net-SSH-Perl-1.30/lib/Nestep 1,
sshappliance.our.domain "conf t"
Now, what? I don't know what to do next. Any idea?Tried
t/SSH/Perl.pm
You can sendmultiplecommands separately with that.
I must have missed something, because i'm new, or an idiot, whichever
you choose. But i was under the impression that Net::SSH does not do
multiple commands for 1 connection, only multiple commands for multiple
connections. Net::SSH2 would do multiple commands, but your device has
to support SSH2. Net::SSH::Perl can handle both SSH1 and SSH2, however
it only supports multiple commands if your proto is SSH2.
Are you saying that it IS possible to do multiple SSH commands on ONE
connection using SSH1 via Net::SSH::Perl? Because, if so, please, oh
please, tell me how you managed that?
Thanks!
Why not use expect?
.
- References:
- Prev by Date: Re: substituting one variable, assign to another
- Next by Date: Re: parsing XML
- Previous by thread: Re: Help, using script to edit router config (entering different modes automatically)
- Next by thread: Storing RegExp matches in an array
- Index(es):
Relevant Pages
|