Public bug reported:

When I run ssh-copy-id with the incorrect flag, I get this failure:

$ sudo bash
# ssh-copy-id -t /root/.ssh/id_rsa.pub zzz...@koch.phon.ox.ac.uk
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/authorized_keys: Name or service not known
#

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
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelModules: fglrx
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
RelatedPackageVersions:
 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..etc.ssh.ssh.config: 2010-10-18T20:51:49.940167

** Affects: openssh (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug natty

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/835901

Title:
  ssh-copy-id: fails to sanitize arguments

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/835901/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to