kiran13 has asked for the wisdom of the Perl Monks concerning the following question:
After login into telnet I need to login into another node, after executing command prompt is getting changed and also before getting prompt able to see some messages also printed, Please help me to change the prompt. after telent prompt is "test@user>" After running telnet command prompt gets changed to "ABC35>". whenever trying to give name prompt while passing cmd, getting timeout error.
$telnet = new Net::Telnet ( Timeout=>5,Errmode=>'die', Prompt => '/\>/ +i', Input_log=>"input.log", Dump_log=>"dump.log", Output_log=>"output +.log"); $telnet->open('ip Address'); $telnet->login('user', 'password'); print $telnet->cmd(String => $cmd_3g_login_node, Prompt => '/\ABC35 +>/i'); output: command timed-out attest.pl at line 3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet + command prompt gets changed after command execution
by kcott (Archbishop) on Sep 14, 2016 at 21:23 UTC | |
|
Re: Net::Telnet + command prompt gets changed after command execution
by NetWallah (Canon) on Sep 14, 2016 at 22:31 UTC |