Advertisement
Guest User

Untitled

a guest
Apr 7th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import paramiko, socket
  2.  
  3. ssh = paramiko.SSHClient()
  4. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  5.  
  6. ssh.connect(router, username=abc, password=abc, timeout=5)
  7.  
  8. ssh = ssh.invoke_shell()
  9. output = ssh.recv(1000)
  10. print output
  11.  
  12. Router#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement