in reply to Re^2: how to connect to a remote server through telnet and fire couple of commands?
in thread how to connect to a remote server through telnet and fire couple of commands?
As the documentation notes:
The typical usage bug causes a time-out error because you've made incorrect assumptions about what the remote side actually sends. The easiest way to reconcile what the remote side sends with your expectations is to use "input_log()" or "dump_log()".
Net::Telnet knows it has logged in when it sees the prompt you've told it to expect. The default *Prompt* is '/\$%#> $/'. That may work better than the bash$ in your example. Note that the value for prompt is treated as a regex, not a literal string.
|
|---|