ssh-copy-id doesn't copy the latest id file even though the documentation says it should
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
New
|
Undecided
|
Unassigned |
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/
/usr/bin/
=-=-=-=-=-=-=-=
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/
/usr/bin/
=-=-=-=-=-=-=-=
Would have added the following key(s):
ssh-ed25519 REDACTED
=-=-=-=-=-=-=-=
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openssh-client 1:6.6p1-2ubuntu2
ProcVersionSign
Uname: Linux 3.13.0-45-generic x86_64
NonfreeKernelMo
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)
RelatedPackageV
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.
modified.
mtime.conffile.
mtime.conffile.