[Bug 3900] New: Misleading verbose output for local-to-local or standard remote-to-remote copies
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Tue Dec 2 21:31:22 AEDT 2025
https://bugzilla.mindrot.org/show_bug.cgi?id=3900
Bug ID: 3900
Summary: Misleading verbose output for local-to-local or
standard remote-to-remote copies
Product: Portable OpenSSH
Version: 10.1p1
Hardware: Other
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: scp
Assignee: unassigned-bugs at mindrot.org
Reporter: cjwatson at debian.org
Created attachment 3923
--> https://bugzilla.mindrot.org/attachment.cgi?id=3923&action=edit
scp: Quote filenames in verbose mode
A long time ago I got
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/89945, applied a
rather hacky patch for it, and moved on. I thought it was about time
to fix this properly.
The original report, which is still basically accurate, was:
scp doesn't report correct action when handling files with spaces in
filename. An example:
$ touch test\ file
$ touch "file test"
$ mkdir test_dir
$ scp -v file\ test test\ file test_dir
Executing: cp file test test_dir
Executing: cp test file test_dir
Compare with cp command that reports filenames correctly:
$ cp -v file\ test test\ file test_dir
`file test' -> `test_dir/file test'
`test file' -> `test_dir/test file'
Now that we have argv_assemble, that seems like the right sort of tool
for the job here. I've attached a patch. Example output:
$ ./scp -v file\ test test\ file test_dir
Executing: cp -- "file test" test_dir
Executing: cp -- "test file" test_dir
$ ./scp -v /dev/null foo
Executing: cp -- /dev/null foo
$ ./scp -v /dev/null 'foo bar'
Executing: cp -- /dev/null "foo bar"
$ ./scp -v /dev/null 'foo"bar'
Executing: cp -- /dev/null foo\"bar
$ ./scp -v /dev/null "foo'bar"
Executing: cp -- /dev/null foo\'bar
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list