Reproduce as follows: % touch "123 456" % scp "123 456" 789 cp: copying multiple files, but last argument `789' is not a directory Try `cp --help' for more information. Using 'cp' works fine in this case. The same problem occurs in many other cases, e.g., when using scp -r with a directory which has a space in its name.
Known, and unfixable, problem with the rcp protocol. A workaround is to double-quote spaces: scp "foo\ bar" foo: We can't fix a 20+ year old, deployed protocol.
Mass change of RESOLVED bugs to CLOSED
*** Bug 957 has been marked as a duplicate of this bug. ***
Can someone explain why this is a protocol problem? If there’s a client-side workaround, why isn’t the filename escaped in the scp client? This is a potentially nasty security problem for a trusted script that scps files from a remote machine, because a malicious filename containing `` could cause arbitrary code to be executed remotely. A similar problem exists with the ssh client: $ touch "123 456" 789; ls 123 456 789 $ ssh host touch "123 456" 789; ssh host ls 123 456 789