0
try:
            with ncclient.manager.connect_ssh(
                host=self.host,
                port=self.port,
                username=user,
                password=passwd,
                hostkey_verify=False,
            ) as self.mgr:
                self.mgr.create_subscription()
                self.logger.info("Connected")

        except Exception:
            self.logger.exception("Failed")
            raise

I am using this piece of code to connect to a session which I can do locally. Everything is correct. But it keep saying me "No existing session"

Errors:

ncclient.transport.errors.AuthenticationError: SSHException('No existing session')

0 Answers0