Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import pysftp
  2.  
  3. pub_key = 'key_file.pub'
  4.  
  5. cnopts = pysftp.CnOpts()
  6. cnopts.hostkeys.load(pub_key)
  7.  
  8. server = pysftp.Connection(host=SFTP_SITE, username=DOWNLOAD['USERNAME'],
  9. password=DOWNLOAD['PASSWORD'], cnopts=cnopts, port=SFTP_PORT)
  10.  
  11. sftp-test.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIE...
  12.  
  13. SSHException: Unable to connect to sftp-test-gwta.rbcis.com: [WinError 10060]
  14. A connection attempt failed because the connected party did not properly respond
  15. after a period of time, or established connection failed
  16. because connected host has failed to respond.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement