def start_server(data): self.server = SSHServer() self.server.protocol = ServerProtocol self.port = reactor.listenTCP(self.portnum, self.server, interface=self.hostname) return self.port
def bring_up_server(data): self.server = SSHServer() self.server.protocol = ServerProtocol self.port = reactor.listenTCP(self.portnum, self.server, interface=self.hostname) log.debug('server started') return data.factory.dConnected
def setUp(self): self.hostname = '127.0.0.1' self.user = getpass.getuser() self.password = '******' self.server = SSHServer() self.server.protocol = ServerProtocol self.port = reactor.listenTCP(0, self.server, interface=self.hostname) self.portnum = self.port.getHost().port options = { 'hostname': self.hostname, 'port': self.portnum, 'user': self.user, 'password': self.password, 'buffersize': 32768 } self.client = SSHClient(options) self.client.protocol = ClientProtocol self.client.connect()