SSH, remote login, and command output

Tim Parkin tim at pollenation.net
Sun Mar 26 13:23:32 EST 2006


Spire 01 wrote:
> Greetings!
> 
> I'm working on a Python program for a small LAN of Linux systems running
> Gentoo, and I need a little help figuring out what I need to do it.  So
> what I'd like to do is, from any given computer, log on to every other
> computer, run a certain command (which normally outputs text to the
> terminal), and store the output so I can use the aggregate statistics
> later in the program.  I would normally something along the lines of SSH
> to do it, but I don't know what I would need to pull that off in
> Python.  There's also one complication: the systems could be Gentoo
> systems, or they could be logged into Windows since they're dual
> booted.  Considering all of this, can anyone give me some recommendation
> as to what library I should learn how to use to pull this off? I admit,
> I haven't done too much in the way of networks, but if someone can tell
> me what I need to do remote logins in this way, I'll do what I can to
> make it work.
> 
> Thanks a million!
> Spire


I wrote a small tool to implement cron like functionality over ssh using
 twisted (with public/private keys). This was written to scratch a small
itch but also to learn how twisted works with conch, it's ssh module.

http://crontorted-project.pollenation.net/cgi-bin/trac.cgi

Feel free to use, I haven't put a license on it but it would be MIT/BSD
.. contact me if you want an explicit confirmation.

Tim Parkin



More information about the Python-list mailing list