Add rtunnel() context manager to open a reverse tunnel (server to client) #821
this pull request implements a rtunnel() context manager that allows to setup a remote forwarding tunnel (listening on the server side, tunneling over SSH and the forwarding to a locally-reachable host:port).
It implements half of issue #78 (the half I was interested in :). I've tested the code and am already using it in my deploy scripts.
Note: while working on this patch, some exceptions would trigger a weird error message:
import logging log = logging.getLogger("paramiko.transport") sh = logging.StreamHandler() sh.setLevel(logging.DEBUG) log.addHandler(sh)
This is probably an unrelated bug: fabric does not configure paramiko logger correctly. You can reproduce the error by adding a typo within the function