[Bug 2196] New: ssh-copy-id: selects "wrong" pubkey

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Jan 15 12:26:45 EST 2014


https://bugzilla.mindrot.org/show_bug.cgi?id=2196

            Bug ID: 2196
           Summary: ssh-copy-id: selects "wrong" pubkey
           Product: Portable OpenSSH
           Version: 6.4p1
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh-copy-id
          Assignee: unassigned-bugs at mindrot.org
          Reporter: felix.kaiser at fxkr.net

Hi,

I have many SSH keys named "id_rsa.NAME.pub" in addition to my
default SSH key named "id_rsa.pub".

Since OpenSSH 1.13 [1], ssh-copy-id uses "ls -t ${HOME}/.ssh/id*.pub"
to determine which key to copy by default.

I believe this "all keys, newest first" approach is very unlikely to
be what the user intended, especially since SSH itself always tries
"id_rsa.pub" by default.

I think it would be better to use
"${HOME}/.ssh/id_{rsa,dsa,ecdsa}.pub".
Also, ssh-copy-id should show the path to the pubkey that it copied,
maybe even the pubkey itself.

Cheers!

[1]
http://anoncvs.mindrot.org/index.cgi/openssh/contrib/ssh-copy-id?annotate=1.15

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list