Skip to content

Instantly share code, notes, and snippets.

Avatar

gnubyte gnubyte

View GitHub Profile
@gnubyte
gnubyte / copy_remote_files.py
Created Aug 1, 2018 — forked from mariusavram91/copy_remote_files.py
Copy remote files to local with Python's Paramiko
View copy_remote_files.py
import os
import paramiko
paramiko.util.log_to_file('/tmp/paramiko.log')
paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts'))
host = 'local'
port = 22
username = 'user'
files = ['file1', 'file2', 'file3', 'file4']