Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import paramiko
  2.  
  3. login_user = 'kuba'
  4. login_pass = 'kuba'
  5. ssh = paramiko.SSHClient()
  6. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  7. ssh.connect('192.168.0.1',username=login_user,password=login_pass, look_for_keys=Fa$
  8. print("success_login")
  9. stdin,stdout,stderr = ssh.exec_command("clear counters gi0/0")
  10. stdin.write('\n')
  11. stdin.flush()
  12. output = stdout.read()
  13.  
  14. print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement