in reply to Perl script to run sudo command(s) on multiple boxes without the use of expect module.

Hello durgesh_p,

Why do you not want to use expect?

Do you have public key infraestructure handling ssh access to your account?

Not perl related, but you could consider see ansible

PD: I have a perl script to use 'ssh server "su - -c xxx"' , but it is using expect, it is called as_root
PD2: To run it on several machines I would use pdsh (still on code.google.com :( )
  • Comment on Re: Perl script to run sudo command(s) on multiple boxes without the use of expect module.

Replies are listed 'Best First'.
Re^2: Perl script to run sudo command(s) on multiple boxes without the use of expect module.
by durgesh_p (Initiate) on Aug 05, 2015 at 17:43 UTC
    There are risks associated with " Expect " with handing passwords... Ansible is an option , but looking for a simple script based solution...

      All scripts which have a password inside will have the same problems that using Expect to introduce password, isn't it?.

      I think it is better to use pki and passwordless specifics sudo commands

      Regards