From 9ad2c0346394738e42d3b48b64cd4da540b18a7e Mon Sep 17 00:00:00 2001 From: Adrian Roata Date: Sat, 9 Jan 2021 00:06:17 +0200 Subject: [PATCH] Update netconf-1.py # updated host address and port with currently running DevNet Sandbox # added new arguments to eliminate 'ncclient.transport.errors.AuthenticationError: SSHException('No existing session')' error. --- Python/Networking/IOS-XE/netconf-1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Python/Networking/IOS-XE/netconf-1.py b/Python/Networking/IOS-XE/netconf-1.py index dd1021e..ccc9ee1 100644 --- a/Python/Networking/IOS-XE/netconf-1.py +++ b/Python/Networking/IOS-XE/netconf-1.py @@ -1,8 +1,9 @@ from ncclient import manager - -router = {"host": "ios-xe-mgmt-latest.cisco.com", "port": "10000", +# updated host address and port +router = {""host": "sandbox-iosxe-latest-1.cisco.com", "port": "830", "username": "developer", "password": "C1sco12345"} -with manager.connect(host=router["host"], port=router["port"], username=router["username"], password=router["password"], hostkey_verify=False) as m: +# added new arguments to eliminate 'ncclient.transport.errors.AuthenticationError: SSHException('No existing session')' error. +with manager.connect(host=router["host"], port=router["port"], username=router["username"], password=router["password"], hostkey_verify=False, allow_agent=False, look_for_keys=False) as m: m.close_session()