ssh-copy-id cannot handle spaces in usernames
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
portable OpenSSH |
Fix Released
|
Low
|
|||
openssh (Debian) |
Fix Released
|
Unknown
|
|||
openssh (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
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
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: openssh-client 1:5.9p1-5ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-32-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu14
Architecture: amd64
Date: Sun Nov 4 02:34:02 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
RelatedPackageV
ssh-askpass N/A
libpam-ssh N/A
keychain N/A
ssh-askpass-gnome 1:5.9p1-5ubuntu1
SSHClientVersion: OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
SourcePackage: openssh
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in openssh: | |
importance: | Unknown → Low |
status: | Unknown → Confirmed |
Changed in openssh (Debian): | |
status: | Unknown → New |
Changed in openssh: | |
status: | Confirmed → Fix Released |
Changed in openssh (Debian): | |
status: | New → Fix Released |
Thank you for taking the time to report this bug and helping to make Ubuntu better.
Marking this as Low priority in Ubuntu since spaces in Unix usernames are so incredibly rare that I assume that this bug only affects a tiny proportion of Ubuntu users.
It looks like there is some quoting missing from the ssh-copy-id script, and that bug comes all the way from upstream via Debian.
The best place to fix this bug would be in the upstream project at http:// www.openssh. com - then Debian and Ubuntu as well as non-Linux ports would all be fixed in one go.
Do you think you could follow this up with upstream directly, please?