import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(\'hostname\', username=\'test1234\', passw
Or use pysftp which is paramiko wrapper and write something like this:
import pysftp
def store_files_name(fname):
pass
def store_dir_name(dir_name):
pass
def store_other_file_type(other_file):
pass
with pysftp.Connection('server', username='user', password='pass') as sftp:
sftp.walktree('.', store_files_name, store_dir_name, store_other_file_type)