How To Copy A Directory Using sftp Aug 28, 2015 This should not be so hard but here is what I had to do: get -r dir locally: mv dir copy_of_dir mkdir copy_of_dir put -r copy_of_dir The remote server complained about Couldn't fsetstat but it worked.