[Twisted-Python] AMP + SSH?

Jean-Paul Calderone exarkun at divmod.com
Thu Mar 6 17:19:50 EST 2008


On Thu, 6 Mar 2008 15:12:35 -0700, Nathan <nathan.stocks at gmail.com> wrote:
>Is there a "twisted" way to run AMP over an SSH connection (with conch?)
>
>The manual way of doing what I want is to connect two machines with a
>TCP port tunneled over ssh, and have my AMP client/server talk over
>the manually tunneled port.

You can run any IProtocol over conch.  It's just not very easy or well
documented.  Take a look at doc/conch/examples/sshsimpleclient.py for
the first part of what's necessary (setting up a client connection and
opening some channels).  sshsimpleserver.py in the same directory will
show you how to run a custom protocol on the server in a /shell/.  You
may not want to use a shell, though.

There are plans to make a much simpler API for setting up SSH connections
intended for programmatic (as opposed to interactive shell) use, but it
will likely be some time before they come to fruition.

Jean-Paul




More information about the Twisted-Python mailing list