[PATCH] ssh-copy-id should do chmod go-w

Matthew Vernon matthew at sel.cam.ac.uk
Thu Oct 4 04:10:48 EST 2001


mouring at etoh.eviladmin.org writes:
 > 
 > Technically should it not be 'chmod 600'  just to ensure we have
 > all permissions right.
 
OK. This version does that. 

Matthew

--- contrib/ssh-copy-id.orig	Thu Sep 27 21:47:44 2001
+++ contrib/ssh-copy-id	Thu Sep 27 21:47:52 2001
@@ -33,7 +33,7 @@
   exit 1
 fi
 
-{ eval "$GET_ID" ; } | ssh $1 "test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys ; chmod g-w . .ssh .ssh/authorized_keys"
+{ eval "$GET_ID" ; } | ssh $1 "test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys ; chmod 600 . .ssh .ssh/authorized_keys"
 
 cat <<EOF
 Now try logging into the machine, with "ssh '$1'", and check in:
 

-- 
Rapun.sel - outermost outpost of the Pick Empire
http://www.pick.ucam.org



More information about the openssh-unix-dev mailing list