Advertisement
Guest User

Untitled

a guest
Feb 15th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/usr/bin/python3
  2. from netmiko import ConnectHandler
  3. import time
  4.  
  5. net_connect = ConnectHandler(device_type='cisco_ios', ip='10.10.10.227', username='pyclass', password='password')
  6.  
  7. device = {
  8. 'device_type': 'cisco_ios',
  9. 'ip':'host',
  10. 'username':'user',
  11. 'password':'xxxx',
  12. }
  13.  
  14. net_connect = ConnectHandler(**device)
  15. output = net_connect.send_command("show version")
  16. print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement