Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pysftp
- remotepath = '/home/a7user/sftp/sftp/CentralData/'
- localpath = 'E:\backup\'
- cnopts = pysftp.CnOpts()
- cnopts.hostkeys = None
- with pysftp.Connection(host='xx.xxx.xx.xx',username='user',password='5fTPt00',cnopts=cnopts) as sftp:
- sftp.put_d(localpath,remotepath)
- print('Upload finished')
Add Comment
Please, Sign In to add comment