Advertisement

06.09.2004 at 11:09AM PDT, ID: 21019469
[x]
Attachment Details

Telnet to windows.

Asked by pavanbh in Perl Programming Language

Tags: , , , ,

Hi,

I am trying to telnet to a remote windows machine using perl. I am using the following code:

use NET::Telnet ();
$remote = new Net::Telnet(Timeout => 10);

$remote->open("machine_name.domainname.com");
$remote->login("my_login_name", "my_password");
print $remote->cmd("dir");

And I get the following error:
timed-out waiting for command prompt at D:\Regression Scripts\Junk\ex5.pl line 54.

What should I be using for the prompt---I tried putting in the same prompt that I get when I do a telnet from the DOS; didn't work.

Thanks.

{{200 of 200 points refunded - jmcg - EE Page Editor for Perl}}Start Free Trial
[+][-]06.09.2004 at 02:55PM PDT, ID: 11274771

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.10.2004 at 12:37PM PDT, ID: 11283109

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl, command, prompt, telnet, windows
Sign Up Now!
Solution Provided By: pavanbh
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.10.2004 at 02:06PM PDT, ID: 11283781

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32