Hi,
in the sample sshsimpleclient.py, it demostrated how to connect to a ssh server and issue a command. my question is what should I do if I want to connect to more than one ssh server.
I did try to create more than one SimpleTransport by using the following code
HOSTS=[host1, host2, host3]
protocol.ClientCreator(reactor, SimpleTransport).connectTCP(host1, 22)
protocol.ClientCreator(reactor, SimpleTransport).connectTCP(host2, 22)
protocol.ClientCreator(reactor, SimpleTransport).connectTCP(host3, 22)
reactor.run()
this really behaves as what i expected, and executed the command on all remote hosts, but after it finishes, i just hangs there, I know I need a place to call something like reactor.stop() when all transport finishes the execution. but i do not know where to call it, need some deffereds? and how?
thanks very much!
James