Skip to content

Instantly share code, notes, and snippets.

@Mierdin
Created March 13, 2014 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mierdin/9532938 to your computer and use it in GitHub Desktop.
Save Mierdin/9532938 to your computer and use it in GitHub Desktop.
#Requires ncclient - https://github.com/leopoul/ncclient
from ncclient import manager
host = '67.218.95.16'
user = 'root'
password = 'root'
with manager.connect(host=host, port=22, username=user, password=password, hostkey_verify=False) as m:
c = m.get().data_xml
with open(r'C:\Temp\test.xml', 'w') as f:
f.write(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment