I have a folder that I want to transfer to a ftp server with Paramiko. I have the following code:
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect("xx.xx.xx.xx", username='user', key_filename='xxx.pem')
ftp_client = client.open_sftp()
ftp_client.put("folder/", "/home/user/folder")
ftp_client.close()
I know you can make the folder/
to a zip file, but that'll cause the zip file to be approximately as large as folder/
which is something I won't be doing in my approach.
Is there another approach? Maybe another module? Thanks.