ssh-copy-id: fails to sanitize arguments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
When I run ssh-copy-id with the incorrect flag, I get this failure:
$ sudo bash
# ssh-copy-id -t /root/.
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh: Could not resolve hostname umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/
#
The correct flag is "-i", rather than "-t".
Now, ssh-copy-id is a shell script, and the last line of the error message is line 44 of the shell script. Apparently, $host is not set and then the command line is passed to ssh as the address. It's a bit of a mess.
ssh-copy-id should make some basic checks on its argument list.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: openssh-client 1:5.8p1-1ubuntu3
ProcVersionSign
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Sun Aug 28 09:24:55 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
LANGUAGE=en_GB:en
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.8p1-1ubuntu3
SSHClientVersion: OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
SourcePackage: openssh
UpgradeStatus: Upgraded to natty on 2011-04-30 (119 days ago)
mtime.conffile.
Changed in openssh (Ubuntu): | |
importance: | Undecided → High |
status: | New → Confirmed |
Thanks for taking the time to report this bug. I trivially confirmed it with your example. I was thinking it was corrupting the authorized_keys, but as it isn't, and as the garbled response is reasonably obviously an indication of an error, I will mark priority low.