[Twisted-Python] SSH connection, redux!

Schneider, Michael michael.l.schneider at ugsplm.com
Mon Mar 1 11:34:38 EST 2004


I just posted some code for review for spawning jobs off
and capturing jobs.

I posted this code for review, since I am new to twisted, and
trying to lean the "twisted way".

This approach may work for you,

Michael Schneider
Senior Software Engineering Consultant
UGS PLM Solutions - an EDS Company
"The Greatest Performance Improvement Is the transitioning from a non-working state to the working state"

> -----Original Message-----
> From: twisted-python-admin at twistedmatrix.com
> [mailto:twisted-python-admin at twistedmatrix.com]On Behalf Of 
> Schollnick,
> Benjamin
> Sent: Monday, March 01, 2004 10:26 AM
> To: 'twisted-python at twistedmatrix.com'
> Subject: RE: [Twisted-Python] SSH connection, redux!
> Folks,
> 	Thanks for the support, so far...  I downloaded the
> precompiled version of the PyCrypto and everything is working fine...
> 	Except for the fact, that I am attempting to figure out
> how to make this work the way, that I *believe* it needs to work...
> 	By the way, I was unable to get the "Writing a client with 
> Twisted.Conch" FAQ to work....  I did find the sshSimpleClient.py
> example, and that is working okay...
> 	But I am having a problem, trying to figure out how to 
> adapt the 
> reactor model with my program...
> 	The application has, for example, 6 "ssh queries" that 
> it needs to
> send, for example a "/usr/sbin/prtconf -v", and then 
> "capture" the output,
> and return the output
> for processing...
> 	Then it proceeds to the next query....etc...
> 	Is there a method that I can setup the communication, 
> and say....
> reactor.send ("asdfasdf")
> data = reactor.recv ()
> 	More along the telnetlib design?  This way, I could branch the
> telnet code
> I use?
> 	Once, I start the reactor, I do not see where I can get 
> data in and
> out,
> without using some form of a global variable...  (Or 
> embedding the reactor
> inside
> another object)
> 				- Benjamin
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

More information about the Twisted-Python mailing list