Advertisement
Guest User

Untitled

a guest
Feb 9th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import paramiko
  2. paramiko.util.log_to_file(r'D:TechnoThroneBuildsparamiko.log')
  3. # Open a transport
  4. host = "stedgela01.TechnoThrone.com"
  5. port = 2222
  6. transport = paramiko.Transport((host, port))
  7. # Auth
  8. password = "xxx"
  9. username = "xxxx"
  10. transport.connect(username = username, password = password)
  11. # Go!
  12. sftp = paramiko.SFTPClient.from_transport(transport)
  13. # Download
  14. filepath = '/A/B/C/pic_ex.png'
  15. localpath = r'D:picfolderpic_ex.png'
  16. sftp.get(filepath, localpath)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement