Bug 2068 - ssh-copy-id cannot handle spaces in usernames
Summary: ssh-copy-id cannot handle spaces in usernames
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-add (show other bugs)
Version: 5.9p1
Hardware: amd64 Linux
: P5 trivial
Assignee: Assigned to nobody
URL: https://bugs.launchpad.net/ubuntu/+so...
Keywords: low-hanging-fruit
Depends on:
Blocks: 1980 V_6_3
  Show dependency treegraph
 
Reported: 2013-02-04 03:27 AEDT by Ken Sharp
Modified: 2013-03-22 12:01 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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