Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pysftp
- pub_key = 'key_file.pub'
- cnopts = pysftp.CnOpts()
- cnopts.hostkeys.load(pub_key)
- server = pysftp.Connection(host=SFTP_SITE, username=DOWNLOAD['USERNAME'],
- password=DOWNLOAD['PASSWORD'], cnopts=cnopts, port=SFTP_PORT)
- sftp-test.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIE...
- SSHException: Unable to connect to sftp-test-gwta.rbcis.com: [WinError 10060]
- A connection attempt failed because the connected party did not properly respond
- after a period of time, or established connection failed
- because connected host has failed to respond.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement