Bug 2068

Summary: ssh-copy-id cannot handle spaces in usernames
Product: Portable OpenSSH Reporter: Ken Sharp <imwellcushtymelike>
Component: ssh-addAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: trivial CC: djm
Priority: P5 Keywords: low-hanging-fruit
Version: 5.9p1   
Hardware: amd64   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1074798
Bug Depends on:    
Bug Blocks: 1980, 2076    

Description Ken Sharp 2013-02-04 03:27:54 AEDT
If a username has a space in it, ssh-copy-id cannot handle it, unless it's in a non-obvious way. ssh itself has no problem with spaces.

$ ssh-copy-id "User name"@server
ssh: Could not resolve hostname User: Name or service not known
$ ssh-copy-id "User\ name"@server
ssh: Could not resolve hostname User\\: Name or service not known
$ ssh-copy-id User\ name@server
ssh: Could not resolve hostname User: Name or service not known

From https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1074798/comments/2
"It looks like there is some quoting missing from the ssh-copy-id script"

Possibly related:
https://bugzilla.mindrot.org/show_bug.cgi?id=1164
https://bugzilla.mindrot.org/show_bug.cgi?id=1980

Apologies if this is logged against the incorrect component. ssh-copy-id seems to call ssh-add but it's more than likely a problem with the script rather than ssh-add.
Comment 1 Damien Miller 2013-03-08 10:23:22 AEDT
retarget to openssh-6.3
Comment 2 Damien Miller 2013-03-22 10:21:11 AEDT
Updated ssh-copy-id script committed for openssh-6.2
Comment 3 Damien Miller 2013-03-22 12:01:59 AEDT
mark bugs closed by openssh-6.2 release as CLOSED