* contrib/ssh-copy-id patch (get rid of identity.pub)
@ 2004-11-13 13:04 Reini Urban
0 siblings, 0 replies; only message in thread
From: Reini Urban @ 2004-11-13 13:04 UTC (permalink / raw)
To: cygwin, openssh-unix-dev
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
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/
[-- Attachment #2: ssh-copy-id_latest.patch --]
[-- Type: text/plain, Size: 1157 bytes --]
--- 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.
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-13 13:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-13 13:04 contrib/ssh-copy-id patch (get rid of identity.pub) Reini Urban
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).