G'day IvanAK,
You appear to have taken that code directly from the Net::Telnet documentation. That's fine.
Just before that example code, you'll see:
"... you must also know the user's shell prompt, which for this example is "bash$ " ..."
And just after, you'll see:
"The methods login() and cmd() use the prompt setting in the object to determine when a login or remote command is complete. Those methods will fail with a time-out if you don't set the prompt correctly."
So, check you have the correct prompt. The problem you've encountered may have nothing to do with an invalid username or password.
-- Ken
In reply to Re: Telnet to a switch
by kcott
in thread Telnet to a switch
by IvanAK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |