Forum

  • You should be able to do this with the following script...
    If you run into problems post the session, just replace any sensitive info.

    #!/usr/bin/perl

    ###Array to hold server to act on
    my @Hosts = ('192.168.1.1', '192.168.1.2', '192.168.1.3");

    ### Requires the Net::Telnet Perl module
    use Net::Telnet ();

    foreach $Ap (@Hosts) {
    my $Port = '23';
    my $t = new Net::Telnet;
    $t->open(Host => $Ap, Port => $Port);
    ### You may need to modify the loging prompt
    if($t->waitfor('/login[: ]*$/i')) {
    $t->print('public');
    }
    ### Modify for comand prompt
    if($t->waitfor('/Replace with telnet command prompt/')) {
    $t->print('reboot 10');
    }
    }

Page 1 of 1
  • 1