I am trying to upload an 80 MB folder from a remote server to my local machine. I know that the file paths are correct, and I know that the folder exists. My current working code (works in a single file) is as follows:
import paramiko def begin(): tran=paramiko.Transport(('dns.server.name', 22)) tran.connect(username='**',password='**') sftp=paramiko.SFTPClient.from_transport(tran) sftp.get('/remote/file/path', '/local/file/path') sftp.close() tran.close()
I tried adding sftp.listdir, but I am afraid that I cannot find enough documentation on this subject to make it clear or useful to me. Is there anything available similar to os.walk?
My question is: how to download small folders via ssh2 protocol available in paramiko?
source share