Guest User

Untitled

a guest
Mar 1st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. client = paramiko.SSHClient()
  2. client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  3. client.connect(hostname=host, port=int(port), username=username, password=password)
  4. stdin, stdout, stderr = ssh_client.exec_command(cmd, timeout=60)
  5.  
  6. stdin.write("myrootpasswdn")
  7. stdin.flush()
Add Comment
Please, Sign In to add comment