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

I need to connect to 3 machines using ssh then prompt for password then go to cd /file then start program then have the 3 machines logs come up. Can anyone help with this.

Replies are listed 'Best First'.
Re: Connecting to machines
by perrin (Chancellor) on Oct 17, 2002 at 21:29 UTC
Re: Connecting to machines
by joe++ (Friar) on Oct 17, 2002 at 21:42 UTC
      Yet another note on connecting between unix/linux boxen using ssh. Again, not Perl related.

      Although there are a few Perl wrappers available (search CPAN for Net::SSH) the real challenge is to connect securely. Storing passwords in files, especially cleartext Perl files, is not regarded secure in any way!

      The alternative is to setup (Open-)SSH for using host keys, better yet, using the ssh-agent utility.

      IBM DeveloperWorks has some excellent articles on this matter. I don't want to repeat these here, so just links:

      For Windows you can use Putty which provides many of the SSH features through commandline utilities.

      --
      Cheers, Joe

      Update: corrected link 2 and added link 3