Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Time out error as I connect to remote desktop server using telnet

by Anonymous Monk
on Oct 04, 2011 at 09:46 UTC ( #929484=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I want to connect a remote windows desktop from a windows machine using Telnet . while executing my program i got error like

timed-out waiting for log in prompt

i used below code

use Net::Telnet(); $telnet = new Net::Telnet ( Errmode=>'die', Prompt => '/\$ $/i'); $telnet->open(host=> 'xxx.xxx.xxx', Port => 80); $telnet->login('username', 'password'); print $telnet->cmd('who');

Regards,

Senthil

Replies are listed 'Best First'.
Re: Time out error as I connect to remote desktop server using telnet
by Corion (Pope) on Oct 04, 2011 at 09:48 UTC

    So, have you checked that the prompt you get from the Windows machine is the prompt you have defined? Have you looked into the debug options that Net::Telnet has? What happened when you tried them?

      Hi Corion

      ya i looked at code.I changed my code like this

      use Net::Telnet(); $telnet = new Net::Telnet (Timeout => 10, Prompt => '/\$ $/i'); $telnet->open(host=>'xx.xxx.xxx.xxx', Port => 80); $telnet->login('username', 'password'); print $telnet->cmd('who');

      Is this correct one?If it is correct Still i am getting Same error

      Can You give me idea to connect remote desktop connection using mstsc

      Regards,

      Senthil

        Can you connect using telnet from the Windows command prompt?

        Update: are you the same Senthil who asked about mstsc here?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://929484]
Front-paged by Arunbear
help
Chatterbox?
[Corion]: Meh. I get the feeling I should post a call-to-action for people to test their modules with the upcoming 5.26 (or 5.25.latest), as it seems that the smoke testers don't really weed out modules that fail without . in @INC
[Corion]: But without instructions on how to easily test things yourself, I don't think such a call to arms is helpful
[Corion]: (this post on nntp.perl.org / p5p makes it seem to me that smoke testers seem to have a blind spot there)
[Corion]: Hmmm. Maybe setting $ENV{PERL5LIB}=" some path without dot"; perl Makefile.PL; make test already is enough to locally test your module...
[Corion]: Meh, no, will need a BEGIN hook...
[Corion]: ... and PERL5OPT does not like -e in it :-(

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-03-27 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (317 votes). Check out past polls.