Ask a Question related to PERL Beginners, Design and Development.
-
Aman Thind #1
Always Timing Out in Net::Telnet :(
Hello Friends,
I have to run a command on my unix box through a script running on my
windows m/c.
Here's my code which is nothing but the example in perldoc of the module :
use Net::Telnet ();
$username = "myusername";
$passwd = "mypasswd";
$t = new Net::Telnet (Timeout => 10, Prompt => '/login \(dell001rs\): $/');
$t->open('my_machine_ip');
$t->login($username, $passwd);
@lines = $t->cmd("who");
print @lines;
Now, as per the module documentation , specifying the Prompt is very
essential if it is not like the default '/[\$%#>] $/ '
It searches through the input stream for the prompt and performs actions
accordingly.
If it is not able to find the prompt in the stream, it shall time-out
looking for the login prompt.
When I login to my machine , the login prompt is like :
login (dell001rs):
And after logging in the prompt becomes :
myusername@dell001rs $
What should I add after "Prompt => " while creating a new session ?
No matter what I try it always aborts with the msg : "timed-out waiting for
login prompt at J:\net.pl line 10" :((
Thanx a lot
Aman
-----Original Message-----
From: Thind, Aman [mailto:aman.thind@fidelity.co.in]
Sent: 05 February 2004 10:55
To: [email]beginners@perl.org[/email]
Subject: Remote script execution
Hello Friends,
I would be really grateful if someone could help me out with this.
I want to write a script that when executed will get lots of details from 10
different Unix(AIX) and Windows(XP) boxes and generate a report.
The details to be gathered about the machines include :
1) Names and versions of all the softwares on the machines.
2) Disk space usage.
Etc...
Please guide me how I could go about it...
I am not aware of how a script running on 1 machine take data from commands
that are to be run on other...(like rsh)
Thanks in advance
-aman
Aman Thind Guest
-
How do you telnet from 1 host to another using Telnet Module
Hello, I need to know how you telnet from one host to another using the net::telnet module. I can telnet to a single host OK but I need to then... -
net::telnet to ms telnet server
i need to connect to a microsoft telnet server via net::telnet (and io::pty). i can connect and communicate successfully via the telnet command in... -
Net::Telnet problem with MS Telnet Service
Hello, After reading the Net::Telnet documentation, examples, searching the 'Net, etc., I still do not completely understand the problem of... -
Develop timing
Hi, I'm Claudio from Rome. I need help to develop Kodak Tri-x 400 (old one) pushed at 1000 in ID-11. Can you help me? Have you got a table with... -
Timing
Hello, My code needs to calculate a value every half second for 40 seconds. I was considering using select as a fixed time value. Is it...



Reply With Quote

