In 4.2 and below, both of the following work even though they have spaces in the username: 1) scp "user name@host:/path" /path 2) scp /path "user name@host:/path" This doesn't work (and can't reliably since it effectively does "ssh host1 scp /path user name@host2:/path" so relies on the remote shell): 3) scp "user name@host1:/path" "user name@host2:/path" In 4.3, 1) still works but 2) doesn't: $ scp /path "user name@localhost:/path" user name: invalid user name I will attach a patch to fix this. It should allow 1) and 2) while still disallowing 3).
Created attachment 1085 [details] Allow spaces in scp usernames $ scp "user name@localhost:/path" /path user name@localhost's password: $ scp /path "user name@localhost:/path" user name@localhost's password: $ scp "user name@localhost:/path" "user name@localhost:/path" user name: invalid user name Also fixes a leak of "arg".
Comment on attachment 1085 [details] Allow spaces in scp usernames the patch looks sane, but i don't quite see how it fixes the problem...
Retarget unclosed bugs from 5.7=>5.8
Retarget unresolved bugs/features to 6.0 release
Retarget unresolved bugs/features to 6.0 release (try again - bugzilla's "change several" isn't)
Retarget from 6.0 to 6.1
Retarget 6.0 => 6.1
Retarget uncompleted bugs from 6.1 => 6.2
Retarget bugs from 6.1 => 6.2
retarget to openssh-6.3
Retarget to openssh-6.4
Retarget 6.3 -> 6.4
Retarget incomplete bugs / feature requests to 6.6 release
Retarget to 6.7 release, since 6.6 was mostly bugfixing.
Remove from 6.6 tracking bug
Retarget incomplete bugs to 6.8 release.
These bugs are no longer targeted at the imminent 6.7 release
OpenSSH 6.8 is approaching release and closed for major work. Retarget these bugs for the next release.
Retarget to 6.9
Move unfinished bugs from 6.9 (how did I miss these?) to 7.1
Retarget to openssh-7.3
retarget unfinished bugs to next release
OpenSSH 7.4 release is closing; punt the bugs to 7.5
Move incomplete bugs to openssh-7.6 target since 7.5 shipped a while back. To calibrate expectations, there's little chance all of these are going to make 7.6.
remove 7.5 target
Move to OpenSSH 7.8 tracking bug
Retarget remaining bugs planned for 7.8 release to 7.9
Retarget unfinished bugs to OpenSSH 8.0
Retarget outstanding bugs at next release
Retarget these bugs to 8.2 release
Prepare for 8.2 release; retarget bugs
Retarget bugs to 8.4 release
retarget to 8.6
retarget after 8.6p1 release
Comment on attachment 1085 [details] Allow spaces in scp usernames this diff is incorrect. The problem is that okname() deliberately refuses names with space characters in them
Created attachment 3534 [details] revised diff; check username only for old-style remote->remote copies For the other two cases handled by toremote(), the target username gets passed to ssh via its argv when it is directly execvp() and not by the shell
applied
closing bugs resolved before the openssh-8.9 release