Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment

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
add comment
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.