Public bug reported: The man page says:
The default_ID_file is the most recent file that matches: ~/.ssh/id*.pub, (excluding those that match ~/.ssh/*-cert.pub) so if you create a key that is not the one you want ssh-copy-id to use, just use touch(1) on your preferred key's .pub file to reinstate it as the most recent. But when I run "ssh-copy-id USER@HOST" the script tries to copy my RSA key even though the documentation suggests that the newer id_ed25519.pub would be copied. ~$ ls -t1 .ssh/id*.pub .ssh/id_ed25519.pub .ssh/id_rsa.pub ~$ ssh-copy-id -n USER@HOST /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys =-=-=-=-=-=-=-= Would have added the following key(s): ssh-rsa REDACTED =-=-=-=-=-=-=-= Specifying the correct key works. ~$ ssh-copy-id -n -i .ssh/id_ed25519 USER@HOST /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys =-=-=-=-=-=-=-= Would have added the following key(s): ssh-ed25519 REDACTED =-=-=-=-=-=-=-= ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: openssh-client 1:6.6p1-2ubuntu2 ProcVersionSignature: Ubuntu 3.13.0-45.74-generic 3.13.11-ckt13 Uname: Linux 3.13.0-45-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.14.1-0ubuntu3.6 Architecture: amd64 CurrentDesktop: Unity Date: Tue Feb 10 22:13:41 2015 InstallationDate: Installed on 2014-05-16 (270 days ago) InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417) RelatedPackageVersions: 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: No upgrade log present (probably fresh install) modified.conffile..etc.ssh.moduli: [modified] modified.conffile..etc.ssh.ssh.config: [modified] mtime.conffile..etc.ssh.moduli: 2015-01-07T03:30:12.433235 mtime.conffile..etc.ssh.ssh.config: 2015-01-12T19:17:20.650115 ** Affects: openssh (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug trusty -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openssh in Ubuntu. https://bugs.launchpad.net/bugs/1420502 Title: ssh-copy-id doesn't copy the latest id file even though the documentation says it should Status in openssh package in Ubuntu: New Bug description: The man page says: The default_ID_file is the most recent file that matches: ~/.ssh/id*.pub, (excluding those that match ~/.ssh/*-cert.pub) so if you create a key that is not the one you want ssh-copy-id to use, just use touch(1) on your preferred key's .pub file to reinstate it as the most recent. But when I run "ssh-copy-id USER@HOST" the script tries to copy my RSA key even though the documentation suggests that the newer id_ed25519.pub would be copied. ~$ ls -t1 .ssh/id*.pub .ssh/id_ed25519.pub .ssh/id_rsa.pub ~$ ssh-copy-id -n USER@HOST /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys =-=-=-=-=-=-=-= Would have added the following key(s): ssh-rsa REDACTED =-=-=-=-=-=-=-= Specifying the correct key works. ~$ ssh-copy-id -n -i .ssh/id_ed25519 USER@HOST /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys =-=-=-=-=-=-=-= Would have added the following key(s): ssh-ed25519 REDACTED =-=-=-=-=-=-=-= ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: openssh-client 1:6.6p1-2ubuntu2 ProcVersionSignature: Ubuntu 3.13.0-45.74-generic 3.13.11-ckt13 Uname: Linux 3.13.0-45-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.14.1-0ubuntu3.6 Architecture: amd64 CurrentDesktop: Unity Date: Tue Feb 10 22:13:41 2015 InstallationDate: Installed on 2014-05-16 (270 days ago) InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417) RelatedPackageVersions: 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: No upgrade log present (probably fresh install) modified.conffile..etc.ssh.moduli: [modified] modified.conffile..etc.ssh.ssh.config: [modified] mtime.conffile..etc.ssh.moduli: 2015-01-07T03:30:12.433235 mtime.conffile..etc.ssh.ssh.config: 2015-01-12T19:17:20.650115 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1420502/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp