[PC-BSD Commits] r6303 - pcbsd/trunk/lifePreserver/scripts

svn at pcbsd.org svn at pcbsd.org
Thu Feb 25 19:27:48 PST 2010


Author: kris
Date: 2010-02-25 19:27:48 -0800 (Thu, 25 Feb 2010)
New Revision: 6303

Modified:
   pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh
Log:

Fixed up setup-ssh-keys.sh, can't use "dd" with append mode, doesn't work on BSD hosts, use tee instead



Modified: pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh
===================================================================
--- pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh	2010-02-25 17:45:02 UTC (rev 6302)
+++ pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh	2010-02-26 03:27:48 UTC (rev 6303)
@@ -34,9 +34,9 @@
 # Get the .pub key
 PUBKEY="`cat .ssh/id_rsa.pub`"
 
-echo $PUBKEY | ssh $SSHUSER@$SSHHOST 'dd of=.ssh/authorized_keys oflag=append conv=notrunc ; chmod 600 .ssh/authorized_keys'
+echo $PUBKEY | ssh $SSHUSER@$SSHHOST 'mkdir .ssh ; tee -a .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys'
 
-echo $PUBKEY | ssh $SSHUSER@$SSHHOST 'dd of=.ssh/authorized_keys2 oflag=append conv=notrunc ; chmod 600 .ssh/authorized_keys2'
+echo $PUBKEY | ssh $SSHUSER@$SSHHOST 'mkdir .ssh ; tee -a .ssh/authorized_keys2 ; chmod 600 .ssh/authorized_keys2'
 
 
 if [ "$?" != "0" ]



More information about the Commits mailing list