Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

How do I do an interactive rlogin in Perl?

by senor_fjord (Initiate)
on Oct 18, 2000 at 00:07 UTC ( [id://37230]=perlquestion: print w/replies, xml ) Need Help??

senor_fjord has asked for the wisdom of the Perl Monks concerning the following question:

I need to run a program on many different machines at once. The only way I can get into them is rlogin (and it doesn't prompt me for the password when I log in). I'd like to automate (using perl) logging into a list of machines and running a program on each.

Note that the program I want to launch is interactive, including an X Windows GUI.

Originally posted as a Categorized Question.

  • Comment on How do I do an interactive rlogin in Perl?

Replies are listed 'Best First'.
Re: How do I do an interactive rlogin in Perl?
by Russ (Deacon) on Oct 18, 2000 at 00:31 UTC
    Since you have rlogin, you should also have rsh. So:
    qx( rsh $host "$command" );
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: How do I do an interactive rlogin in Perl?
by runrig (Abbot) on Oct 18, 2000 at 00:39 UTC
    use Expect

    Originally posted as a Categorized Answer.

Re: How do I do an interactive rlogin in Perl?
by Anonymous Monk on Jun 07, 2001 at 10:09 UTC
    You can use Expect:
    Expect->spawn("/usr/bin/rlogin -l $user $host");

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://37230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found