in reply to Re: Re: Re: Telnet into Cisco switches
in thread Telnet into Cisco switches

nachoz, i tried
$session->login(undef,'password');
because there is no username for the login, just a password, but that did not work. and the router has a prompt
router> router# router$
so is that okay?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Telnet into Cisco switches
by blue_cowdawg (Monsignor) on Jul 11, 2003 at 16:35 UTC

    Sometime after I wrote my script, my boss in his infinite wisdom decided to hack the sh*t out of my code and render it unreconizable and unreadable. Otherwise I would have posted sniglets of it here.

    Here is what I remember of what I did when I wrote my login routine:

    • First off I did not use the login method supplied by Net::Telnet or Net::Telnet::Cisco.
    • Instead I used the print -- waitfor combination and decided what to do next based on ($match,$prematch)
    • Since there are multiple passwords in our environmet for the network elemenets on our network. To get around that issue I used my own form of try<->catch type of logic.


    Peter L. BergholdBrewer of Belgian Ales
    Peter@Berghold.Netwww.berghold.net
    Unix Professional