Python pysftp get_r from Linux works fine on Linux but not on Windows
I would like to copy an entire directory structure with files and subfolders recursively using SFTP from a Linux server to a local machine (both Windows and Linux)using Python 2.7. I am able to ping the server and download the files using WinSCP from the same machine. I tried the following code, works fine on Linux but not on Windows. I tried \ , / , os.join , all gives me same error, checked permissions as well. import os import pysftp cnopts = pysftp.CnOpts() cnopts.hostkeys = None # disable host key checking. sftp=pysftp.Connection('xxxx.xxx.com', username='xxx',password='xxx',cnopts=cnopts