On Tue, 14 Sep 2004 07:36:38 -0600, Wiggins d Anconia
<[EMAIL PROTECTED]> wrote:
> > I have a script that I use to ssh to a list of servers to run a few
> > commands. I'm trying to find a way su up & run a command - however I'm
> > in need of some inspiration as to how to pull this off.
> >
> 
> Have you considered 'sudo' instead?  It would make this task much
> easier, would eliminate the need to handle passwords and would provide
> further security by limiting the command that can be run.  I would look
> into using it first, if you can't let us know and we might be able to
> come up with something.
> 

I don't have complete control over the remote server, so I am limited
in some ways. Theres no sudo available, however wouldn't this require
an interactive response anyway ?. I've considered a few options from
stuid to hostkeys & I really want to run this interactively to some
extent. At the moment I do something like:-
$for N in 2 - 8; do ssh mta0${N}.fqdn; done & su -
/usr/local/bin/run_cmd at each server. I have to watch the output, to
ensure theres no mishaps and don't want to put too much logic into
this script.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to