To successfully copy files containing spaces in path or filename using scp, you have to enclose the path with “” and also escape spaces and other special characters:

scp foo.com:”/home/fubar/some\ folder/file.txt” .

Advertisements