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

svn at pcbsd.org svn at pcbsd.org
Wed Feb 24 09:27:14 PST 2010


Author: kris
Date: 2010-02-24 09:27:14 -0800 (Wed, 24 Feb 2010)
New Revision: 6294

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

Updated setup-ssh-keys.sh script to use "dd" instead of re-directs



Modified: pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh
===================================================================
--- pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh	2010-02-24 16:59:49 UTC (rev 6293)
+++ pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh	2010-02-24 17:27:14 UTC (rev 6294)
@@ -34,8 +34,11 @@
 # Get the .pub key
 PUBKEY="`cat .ssh/id_rsa.pub`"
 
-ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} "mkdir .ssh ; echo $PUBKEY >> .ssh/authorized_keys; chmod 600 .ssh/authorized_keys ; echo $PUBKEY >> .ssh/authorized_keys2; chmod 600 .ssh/authorized_keys2"
+echo $PUBKEY | ssh $SSHUSER@$SSHHOST 'dd of=.ssh/authorized_keys oflag=append conv=notrunc ; chmod 600 .ssh/authorized_keys'
 
+echo $PUBKEY | ssh $SSHUSER@$SSHHOST 'dd of=.ssh/authorized_keys2 oflag=append conv=notrunc ; chmod 600 .ssh/authorized_keys2'
+
+
 if [ "$?" != "0" ]
 then
   touch /tmp/.failedPreserver-${SSHUSER}



More information about the Commits mailing list