scripting - calling an interactive bash script over ssh -


i'm writing "tool" - couple of bash scripts - automate installation , configuration on each server in cluster.

the "tool" runs primary server. tars , distributes it's self (via scp) every other server , untars copies via "batch" ssh.

during set-up tool issues remote commands such following primary server: echo './run_audit.sh' | ssh host4 'bash -s'. approach works in many cases, except when there's interactive behavior since standard input in use.

is there way run remote bash scripts interactively on ssh?

as starting point, consider following case: echo 'read -p "enter name:" name; echo "your name $name"' | ssh host4 'bash -s'

in case above prompt never happens, how work around that?

thanks in advance.

run command directly, so:

ssh -t host4 bash ./run_audit.sh 

for encore, modify shell script reads options command line or configuration file instead of stdin (or in preference stdin).

i second dennis williamson's suggestion puppet/etc instead.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -