P
Petterson Mikael
Hi,
I am using Net::Telnet module in perl to connect to a remote client.
I get a timeout for '$telnet->login($username, $password);'.
timed-out waiting for command prompt at ./telnet.pl line 15
Any ideas why?
I have tried with regular telnet and it works!
//Mikael
Script
-------------------------------------------
#!/vobs/cello/cade_struct/bin/perl -w
use Net::Telnet;
my $hostname = 'ws3196.rnd.ki.sw.ericsson.se';
my $username = 'eraonel';
my $password = 'test';
my $telnet = new Net::Telnet ( Timeout=>30,
Errmode=>'die');
$telnet->open($hostname);
$telnet->login($username, $password);
$telnet->waitfor('/login:.*$/');
print $telnet->cmd('whoami');
This is how my telnet login looks like:
***************************************
Trying 147.214.201.190...
Connected to ws3196.
Escape character is '^]'.
SunOS 5.8
login:
****************************************
I am using Net::Telnet module in perl to connect to a remote client.
I get a timeout for '$telnet->login($username, $password);'.
timed-out waiting for command prompt at ./telnet.pl line 15
Any ideas why?
I have tried with regular telnet and it works!
//Mikael
Script
-------------------------------------------
#!/vobs/cello/cade_struct/bin/perl -w
use Net::Telnet;
my $hostname = 'ws3196.rnd.ki.sw.ericsson.se';
my $username = 'eraonel';
my $password = 'test';
my $telnet = new Net::Telnet ( Timeout=>30,
Errmode=>'die');
$telnet->open($hostname);
$telnet->login($username, $password);
$telnet->waitfor('/login:.*$/');
print $telnet->cmd('whoami');
This is how my telnet login looks like:
***************************************
Trying 147.214.201.190...
Connected to ws3196.
Escape character is '^]'.
SunOS 5.8
login:
****************************************