def connectSSHTransport(service, hostAddress=None, peerAddress=None):
 transport = SSHServerTransport()
 transport.makeConnection(StringTransport(hostAddress=hostAddress, peerAddress=peerAddress))
 transport.setService(service)

def connectSSHTransport ( service , hostAddress = None , peerAddress = None ) : transport = SSHServerTransport ( ) transport . makeConnection ( StringTransport ( hostAddress = hostAddress , peerAddress = peerAddress ) ) transport . setService ( service )
connect a sshtransport which is already connected to a remote peer to the channel under test .