Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Python/Networking/IOS-XE/netconf-1.py
Original file line number Diff line number Diff line change
@@ -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()