--- openssh-3.9p1-2/contrib/ssh-copy-id.orig	2004-01-04 22:16:34.001000000 +0100
+++ openssh-3.9p1-2/contrib/ssh-copy-id	2004-11-13 13:53:04.167750000 +0100
@@ -1,11 +1,13 @@
 #!/bin/sh
 
-# Shell script to install your identity.pub on a remote machine
+# Shell script to install your newest identity.pub onto a remote machine.
 # Takes the remote machine name as an argument.
 # Obviously, the remote machine must accept password authentication,
 # or one of the other keys in your ssh-agent, for this to work.
+# TODO: check if already in?
 
-ID_FILE="${HOME}/.ssh/identity.pub"
+#ID_FILE="${HOME}/.ssh/identity.pub"
+ID_FILE="$(ls -t ${HOME}/.ssh/id*.pub | head -n1)"
 
 if [ "-i" = "$1" ]; then
   shift
@@ -41,9 +43,11 @@
 { eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys" || exit 1
 
 cat <<EOF
-Now try logging into the machine, with "ssh '$1'", and check in:
+Appended ${ID_FILE} to $1:.ssh/authorized_keys
 
-  .ssh/authorized_keys
+Now try logging into the machine, with "ssh '$1'", and check:
+
+  ~/.ssh/authorized_keys
 
 to make sure we haven't added extra keys that you weren't expecting.
 
