[paramiko] push update scripts to a bunch of remote machines

James Bardin jbardin at bu.edu
Tue Apr 3 06:53:05 PDT 2007


Hi Guillaume,

That's relatively easy to do with a combination of sftp, and ssh.
I have a program I wrote to do this exact same thing, because the 
current shells for clusters didn't do what I wanted. You can use this if 
you want, or it may give you some ideas.

run 'mpc -h' or check the source for more info.
Connects to each host in a separate thread for concurrency.
You can have groups of hosts in files, or specified on the command line.
It prints output in order by host.
Uses an agent, or tries your default keys.

I still have to add an option for host id checking, and add doc strings, 
among other things.

I don't use the option to execute a script very often, because all my 
machines mount from the same nfs server, so I just put scripts there and 
send a command to run it.

You need to be using a recent paramiko for this to run (at least 1.6.4 I 
think)

Hope this helps

-jim


Tessier AtosOrigin wrote:
> Hello paramiko users.
>
> First of all, let me explain what i'd like to do :
> I have about a hundred Linux machines to administrate. I wrote an app in 
> bash that automatically push batches onto all those machines.
>
> I would like to know if paramiko would allow me to push whole script files 
> (bash ior python) throught ssh to be executed onto remote machines?
>
> Thanks for all
>
>
> Guillaume TESSIER
> Philips - PGIS Hosting
> 51 rue Carnot - 92150 Suresnes 
> tel : 01 47 28 (14 13)
> mobile : 06 66 80 26 38
> Email : tessier.atosorigin at philips.com
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> paramiko mailing list
> paramiko at lag.net
> http://mail.lag.net/mailman/listinfo/paramiko

-- 

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
James Bardin - Systems Analyst / Administrator I
Boston University Department of Electrical and Computer Engineering
8 Saint Mary's St, Room 305, Boston, MA 02215
Ph:617-358-2785         http://www.bu.edu/ece/it
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpc.tgz
Type: application/x-compressed-tar
Size: 4205 bytes
Desc: not available
Url : http://mail.lag.net/pipermail/paramiko/attachments/20070403/263b1520/attachment.bin 


More information about the paramiko mailing list