Guest User

Untitled

a guest
Oct 19th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. stdin,stdout,stderr=ssh.exec_command("touch Hello")
  2.  
  3. print "hello,world"
  4.  
  5. transport = paramiko.Transport(("host", 22))
  6. transport.connect(username = "username", password = "password")
  7. sftp = paramiko.SFTPClient.from_transport(transport)
  8.  
  9. f = sftp.open("/path/to/remote/file", "wb")
  10. f.write("hello,world")
  11. f.close()
Add Comment
Please, Sign In to add comment