I am just trying to get a simple script to work. Currently it is giving the following error:
"timed-out waiting for command prompt at ./test_telnet.pl line 11"
I don't know what I'm doing wrong... the prompt for this host is:
myuser@myhost{myfolder}>
Here's what I'm trying... Please help.
#! /usr/local/bin/perl -w
use Net::Telnet ();
$host="myhost";
$username="myname";
$password="mypassword";
$t = new Net::Telnet ( Timeout => 20, Prompt => '/myname\@myhost\{myfolder\}\> $/');
$t->open($host);
$t->login($username, $password);
@lines = $t->cmd("/usr/bin/who"
;
print @lines;
"timed-out waiting for command prompt at ./test_telnet.pl line 11"
I don't know what I'm doing wrong... the prompt for this host is:
myuser@myhost{myfolder}>
Here's what I'm trying... Please help.
#! /usr/local/bin/perl -w
use Net::Telnet ();
$host="myhost";
$username="myname";
$password="mypassword";
$t = new Net::Telnet ( Timeout => 20, Prompt => '/myname\@myhost\{myfolder\}\> $/');
$t->open($host);
$t->login($username, $password);
@lines = $t->cmd("/usr/bin/who"
print @lines;