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

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to