Comment 0 for bug 1342412

On ubuntu 14.04 amd 64, running openssh-client 1:6.6p1-2ubuntu2, when using in ~/ssh/config
  ControlMaster auto

If you open an ssh connection to an host, and after try to run ssh-copy-id on the same host, trying to reuse the already opened connection, ssh-copy-id hangs.
If you press CTRL-D, the script goes on, without installing any key.

It seems that the script hangs at lines
 REMOTE_VERSION=$(ssh -v -o PreferredAuthentications=',' "$@" 2>&1 |
                  sed -ne 's/.*remote software version //p')

Found another bug report here:

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openssh-client 1:6.6p1-2ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-32.56-generic
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jul 16 01:15:34 2014
InstallationDate: Installed on 2013-10-12 (276 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
 ssh-askpass N/A
 libpam-ssh N/A
 keychain N/A
 ssh-askpass-gnome 1:6.6p1-2ubuntu2
SSHClientVersion: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014
SourcePackage: openssh
UpgradeStatus: Upgraded to trusty on 2014-06-10 (35 days ago)
modified.conffile..etc.ssh.ssh.config: [modified]
mtime.conffile..etc.ssh.ssh.config: 2014-06-19T17:39:06.965908