Guest User

Untitled

a guest
Nov 28th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import pysftp
  2. import paramiko
  3. from paramiko.py3compat import decodebytes
  4.  
  5. keydata = b"""4049a539f13cba06a874c4b6aadd0cc4"""
  6.  
  7. key = paramiko.RSAKey(data=decodebytes(keydata))
  8. cnopts = pysftp.CnOpts()
  9. cnopts.hostkeys.add('sftp://adwords-flights.almundo.it', 'ssh-rsa', key)
  10.  
  11. with pysftp.Connection('adwords-flights.almundo.it', username='google', password='Vah0oozu', cnopts=cnopts) as sftp:
  12. sftp.get('remote_file')
Add Comment
Please, Sign In to add comment