Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have many ubuntu 10.04 computers.

Is there any program that can allow me to select a shell file, and have it automatically log in to each computer of a list of computers (through say ssh), and download and run the shell script?

share|improve this question

You could probably write your own shell script to do so. There is a great deal of info here, http://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-shell-script-on-a-remote-machine.

share|improve this answer

you might find python paramiko library useful. I wish you had provided more detailed spec. Here are some simple examples with the library.

http://jessenoller.com/2009/02/05/ssh-programming-with-paramiko-completely-different/

share|improve this answer
up vote 0 down vote accepted

I ended up doing this:

#!/bin/bash
myscript=`cat /dev/stdin`
echo "$myscript; exit;" | sshpass -p $3 ssh -o StrictHostKeyChecking=no $2@$1

You can then call the script like this:

cat script-to-run.sh | script-above.sh SERVER USERNAME PASSWORD

The script will run on the remote computer.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .