def METHOD_NAME(self):
    try:
        # sshd needs to be run with an absolute path, hence the call to which()
        sshpath = shutil.which('sshd')
        assert sshpath is not None, "can find sshd executable"
        p = subprocess.Popen([sshpath, '-D', '-f', self.config_file],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        while True:
            ec = p.poll()
            if self.stop_flag:
                p.terminate()
                break
            elif ec is None:
                time.sleep(0.1)
            elif ec == 0:
                self.error = Exception('sshd exited prematurely: {}{}'.format(p.stdout.read(),
                                                                              p.stderr.read()))
                break
            else:
                self.error = Exception('sshd failed: {}{}'.format(p.stdout.read(),
                                                                  p.stderr.read()))
                break
    except Exception as ex:
        logger.exception("SSHDThread exception from run loop")
        self.error = ex