[Twisted-Python] Question about conch.ssh.forwarding

Joshua Smith jsmith at psych.duke.edu
Sun Jan 11 19:30:06 MST 2004


Perfect. Thanks Paul, I now have fun things to play with.

Paul Swartz wrote:

>On Sat, Jan 10, 2004 at 09:40:14PM -0500, Joshua Smith wrote:
>  
>
>>I am working on creating a module for a project involving workstation 
>>administration and have been trying to get the ssh port forwarding in 
>>conch to work. Anybody have any quick and dirty examples of this? My 
>>goal is to be able to forward traffic to our mail server and a central 
>>administrative console in a secure fashion. I have had limited success 
>>with python controlling the command line ssh, but it is unwieldy 
>>compared to doing it natively in python.
>>    
>>
>
>Once you have an SSHConnection instance:
>
>reactor.listenTCP(localPortToListenOn,
>    forwarding.SSHListenForwardingFactory(conn, (hostToConnectTo,
>                                                 portToConnectTo),
>                                          SSHListenClientForwardingChannel))
>
>Then you can connect to localPortToListenOn any way you want.
>
>-p
>  
>

-- 
Joshua H. Smith
Computer Support
The Department of Psychological & Brain Sciences
Rm 017
Jsmith at psych.duke.edu
919-660-5680 






More information about the Twisted-Python mailing list