Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <41960669.2090206@x-ray.at> Date: Sat, 13 Nov 2004 14:04:41 +0100 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a4) Gecko/20040927 MIME-Version: 1.0 To: cygwin , openssh-unix-dev AT mindrot DOT 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 AT x-ray DOT 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 <