[Twisted-Python] Question about conch.ssh.forwarding
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. -- Joshua H. Smith Computer Support The Department of Psychological & Brain Sciences Rm 017 Jsmith@psych.duke.edu 919-660-5680
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 -- Paul Swartz (o_ http://www.twistedmatrix.com/users/z3p.twistd/ _o) //\ z3p@twistedmatrix.com /\\ V_/_ AIM: z3penguin _\_V->
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@psych.duke.edu 919-660-5680
participants (2)
-
Joshua Smith
-
Paul Swartz