in reply to Re: Windows Remote Desktop In Perl
in thread Windows Remote Desktop In Perl

Hi there,

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?

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);
Error -pattern match timed-out at C:\Lokesh\Perl\t.pl line 24 Please help... Thanks,

Replies are listed 'Best First'.
Re^3: Windows Remote Desktop In Perl
by Anonymous Monk on Jul 15, 2013 at 10:43 UTC
    Hi Muralidharan, Could you please share the working code.
Re^3: Windows Remote Desktop In Perl
by Anonymous Monk on Feb 27, 2013 at 14:45 UTC
    Hi Monks I executed same program,I got the following error "Unknown remote Host" ,I enable the telnet services on both servers.Please send the complete code how to connect remote server(windows).

      Can you connect to the host via another mechanism, for example telnet from the command prompt?