Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Net::Telnet prompt problem
April 13, 2005, 5:22 pm
rate this thread
I get this error when running my small test program...
timed-out waiting for login prompt
$host = '192.168.100.251';
$port = '24';
$username = 'admin';
$password = '';
$prompt = '/User:/';
$session = new Net::Telnet
Timeout => 5,
Prompt => $prompt
$session -> open(Host => $host,Port => $port);
$session -> login($username, $password);
Here is the ouput from inputlog.txt:
I am guessing there is a problem with prompt, but I have tried a few
different matches without success...
Re: Net::Telnet prompt problem
Prompt has no effect on login function. Well, it does, but not on
username/password command-line patterns.
login function waits for patterns like this:
You have the prompt "User:", that is why login times out; Try using
print/waitfor instead. It can be something like this:
and so on.
Hope this Helps a little.