Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. import paramiko
  2.  
  3. cmd = "ls zip.zip"
  4.  
  5. ssh = paramiko.SSHClient()
  6. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  7. ssh.connect('servgqsi', username='usuario', password='senha')
  8. stdin, stdout, stderr = ssh.exec_command(cmd)
  9. stdin.write('gss\n')
  10. stdin.flush()
  11. a=stdout.readlines()
  12. ssh.close()
  13.  
  14. print "O COMANDO A = %s" %a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement