Guest User

Untitled

a guest
Mar 7th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import paramiko
  2.  
  3. client = paramiko.SSHClient()
  4. client.load_system_host_keys()
  5. client.set_missing_host_key_policy(paramiko.WarningPolicy())
  6.  
  7. server_add = "127.0.0.1"
  8. username = "yyy"
  9. password = "xxx"
  10.  
  11. client.connect(server_add, port=22, username= username, password= password)
  12.  
  13. stdin, stdout, stderr = client.exec_command("ls")
  14.  
  15. print stdout.read()
Add Comment
Please, Sign In to add comment