Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <41960669.2090206@x-ray.at>
Date: Sat, 13 Nov 2004 14:04:41 +0100
From: Reini Urban <rurban@x-ray.at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a4) Gecko/20040927
MIME-Version: 1.0
To: cygwin <cygwin@cygwin.com>, openssh-unix-dev@mindrot.org
Subject: contrib/ssh-copy-id patch (get rid of identity.pub)
Content-Type: multipart/mixed; boundary="------------070209020900040609020108"
X-IsSubscribed: yes

--------------070209020900040609020108
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Please consider this simple ssh-copy-id patch,
and adding contrib/ssh-copy-id as install target for cygwin. (man and 
shellscript)

20041113
  - [contrib\ssh-copy-id]: change default to newest .ssh/id*.pub
	From: Reini Urban rurban@x-ray.at

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--------------070209020900040609020108
Content-Type: text/plain;
 name="ssh-copy-id_latest.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ssh-copy-id_latest.patch"

--- 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.
 


--------------070209020900040609020108
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------070209020900040609020108--
