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:





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 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 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 supportssshpublic/private key authentication. Step 2 is also
not a problem since I can execute it together with the command I use in
step 1,

sshappliance.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 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!


.



Relevant Pages

  • Re: ExecuteCommand
    ... ExecuteCommand procedure. ... Are you trying to run multiple commands simultaneously, ... sub read_stdout { ...
    (comp.lang.perl.tk)
  • Re: ExecuteCommand
    ... Are you trying to run multiple commands simultaneously, ... Here is a simple example showing how to use fileevent. ... sub read_stdout { ...
    (comp.lang.perl.tk)
  • RE: Help, using script to edit router config (entering different modes automatically)
    ... Then you go into a certain mode by typing a particular command. ... multiple commands for 1 connection, ...
    (perl.beginners)
  • Re: IIS : access to cmd.exe and multiple commands on one line
    ... Subject: IIS: access to cmd.exe and multiple commands on one line ... On Tue, 23 Oct 2001, Daniel Polombo wrote: ... This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)
  • Re: Update query
    ... As long as the database supports batch commands then yes you can send ... multiple commands to it. ... As far as the second question though - I'm not ...
    (microsoft.public.dotnet.framework.adonet)