Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Net::Telnet::Cisco, a question (ditch the arugment 'login')

by ybiC (Prior)
on Dec 18, 2001 at 08:37 UTC ( [id://132781]=note: print w/replies, xml ) Need Help??


in reply to Net::Telnet::Cisco, a question

Even though perldoc Net::Telnet::Cisco has an example using this syntax, I believe the problem is in this line:
my $ok = $cs->login('login', $switchPassword) or die "Error logging in: @{[ $cs->errmsg+() ]}\n";

You probably shouldn't have the word login as the first argument.   Try empty single quotes instead, like so:
$ok = $cs->login('', $switchPassword) or die "Error logging in: @{ $cs->errmsg+() }\n";
since the first agument is userID.

Additional info can be found at perldoc Net::Telnet.   I don't have access to chassis Catalysts for the time being, otherwise I'd take your code out for a spin.   So please feel free to /msg me or post a reply to this node if any other questions.
    hope this helps,
    Don
    striving toward Perl Adept
    (it's pronounced "why-bick")

p.s. I could be wrong, but AFAIK, the only difference between 'use warnings' and '-w' is what versions of the Perl interpreter support them - the former only on 5.6 or greater, the latter useable from waaay back to 4.something props to tye for the ancient history {grin}.

p.p.s. Welcome to the Monastery, ericj!

Replies are listed 'Best First'.
Re: Re: Net::Telnet::Cisco, a question (ditch the arugment 'login')
by ericj (Initiate) on Dec 19, 2001 at 02:01 UTC
    Thanks for the welcome and the advice. As far as I can tell, Net::Telnet::Cisco works on anything running IOS. I have not been able to get this to work on any Cisco devices running the Catalyst OS. I think I may have to change the perl mod to work on these.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://132781]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-19 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found