in reply to Re: Windows Remote Desktop In Perl
in thread Windows Remote Desktop In Perl
I am having the same issue as you mentioned earlier. I started the Telnet services on both the server but the script is failing with a timeout error. Could you please paste the code which is working for you?
Error -pattern match timed-out at C:\Lokesh\Perl\t.pl line 24 Please help... Thanks,use warnings; use Net::Telnet; $myIPaddress = "Host IP"; $myDefaultPassword = 'pwd'; $myUsername = "username"; $myHostname = "somehostname"; $OutputFile = "$myHostname" . "_" . ".txt"; open (OUTPUT, ">>$OutputFile"); $telnet = new Net::Telnet ( Timeout=>10,Errmode=>'die'); $telnet->open("$myIPaddress"); $telnet->print("$myUsername"); $telnet->print("$myDefaultPassword"); $telnet->print("enable"); @running = $telnet->waitfor("/$myHostname# \$/i"); $running = "@running"; print OUTPUT $running; close (OUTPUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Windows Remote Desktop In Perl
by Anonymous Monk on Jul 15, 2013 at 10:43 UTC | |
|
Re^3: Windows Remote Desktop In Perl
by Anonymous Monk on Feb 27, 2013 at 14:45 UTC | |
by marto (Cardinal) on Feb 27, 2013 at 14:51 UTC |