http://www.perlmonks.org?node_id=37230

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");