transport = paramiko.Transport((host, port))
password = 'foo'
username = 'bar'
transport.connect(username=username, password=password)
sftp = paramiko.SFTPClient.from_transport(transport)
filepath = '/etc/passwd'
localpath = '/home/remotepasswd'
sftp.get(filepath, localpath)
filepath = '/home/foo.jpg'
localpath = '/home/pony.jpg'
sftp.put(localpath, filepath)
sftp.close()
transport.close()
paramiko's sshclient with sftp