How to use the sshtunnel.RFBSSHChannel function in sshtunnel

To help you get started, we’ve selected a few sshtunnel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stephank / libvirtweb / rfbproxy.py View on Github external
def sshconnect(service):
         protocol = factory.buildProtocol(None)
         transport = sshtunnel.RFBSSHChannel(protocol)
         request = forwarding.packOpen_direct_tcpip(
               (info['vnchost'], info['vncport']),    # The remote endpoint
               ('localhost', 0))                      # The local endpoint
         log.msg("Opening VNC connection to %s:%d over SSH tunnel" % (info['vnchost'], info['vncport']))
         service.openChannel(transport, request)
         return service