How is it possible to login as root with Perl script and used telnet.pm
I write a perl script under UNIX/LINUX.
The aim of this script is to open a telnet session as ROOT.
To do this, I use the library telnet.pm under perl.
Following is my source code :
$telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die', Prompt=>'/\$ $/i');
$fh1 = $telnet->option_log("optionlog.txt");
$fh2 = $telnet->input_log("inputlog.txt");
$fh3 = $telnet->output_log("outputlog.txt");
When I run this script, I have the following message :
timed-out waiting for password prompt at MyScript.pl
But when I want to open a telnet session and login as root any password is needed !!!!
I don't understand what is happened ?
Can someone tell me how it is possible do this with telnet.pm under perl script ?
Best regards, @+, Manu