I have been able to use ssh and issue command in the remote server. Now I want to scp files from the remote server but that just seems like its impossible. I'm totally new to python and Paramiko. The error is permission denied in my local directory of darn windows. The files are supposed to come from the Mac. Any other really really simple example I can use to scp files from a remote Linux machine to my local Windows machine?
hostname = '192.xx.1.xx'
password = 'pop123'
username = "husbad2"
port = 22
t = paramiko.Transport((hostname, 22))
sftp = paramiko.SFTPClient.from_transport(t)
To retrieve files from a remote host into a local directory
..... localpath='C:\Users\handsonexpert\Documents\file3.txt' remotepath='/Users/ihussain/testdir/file3.txt' ..... sftp.get(remotepath, localpath)