Description of problem: scp fails to identify a target, if it contains spaces Version-Release number of selected component (if applicable): openssh-clients-3.9p1-8.RHEL4.17.1 How reproducible: always if remote path has spaces Steps to Reproduce: 1. # scp testfile tr@neptun:"/home/tr/dir with spaces/" tr@neptun's password: scp: ambiguous target 2. # scp testfile tr@neptun:'/home/tr/dir with spaces/' tr@neptun's password: scp: ambiguous target 3. # scp testfile tr@neptun:/home/tr/dir\ with\ spaces/ tr@neptun's password: scp: ambiguous target any variant I have forgotten? Actual results: scp fails to copy Expected results: scp should copy Additional info: Maybe fixed in later versions?
both machines (source and target) are El4.4
scp is run on the remote side through shell and it expands the arguments. This allows for example 'scp remote.server:*.c .'. So the spaces must be double-escaped like this: # scp testfile tr@neptun:'/home/tr/dir\ with\ spaces/'