Advertisement
Guest User

Untitled

a guest
May 24th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. client = paramiko.SSHClient()
  2. client.set_missing_host_key_policy(AllowAnythingPolicy())
  3. client.connect(client_host, username=client_username, password=client_password)
  4. sftp = client.open_sftp()
  5.  
  6. # sftp.get_channel().in_window_size = 2097152
  7. # sftp.get_channel().out_window_size = 2097152
  8. # sftp.get_channel().in_max_packet_size = 2097152
  9. # sftp.get_channel().out_max_packet_size = 2097152
  10.  
  11. latest_filename = "test.zip"
  12.  
  13. sftp.get(sftp_path+"/"+latest_filename, destination_path+"/"+latest_filename, callback=callback_for_filename)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement