Permalink
Browse files

Sync ssh keys script with life-preserver

  • Loading branch information...
1 parent 40f8632 commit 273d110386bfe0f317de7731a296c639dd54fbf3 @kmoore134 kmoore134 committed Sep 27, 2013
Showing with 13 additions and 9 deletions.
  1. +13 −9 src-qt4/pc-installgui/scripts/setup-ssh-keys.sh
@@ -6,9 +6,9 @@ SSHUSER=$1
SSHHOST=$2
SSHPORT=$3
-if [ -z "${SSHUSER}" -o -z "${SSHHOST}" ]; then
- echo "ERROR: Usage setup-ssh-keys.sh <user> <host>"
- touch /tmp/.ssh-auth-failed
+if [ -z "${SSHUSER}" -o -z "${SSHHOST}" ]
+then
+echo "ERROR: Usage setup-ssh-keys.sh <user> <host>"
exit 150
fi
@@ -17,15 +17,17 @@ cd /root
echo "Preparing to setup SSH key authorization..."
echo "When prompted, enter your password for ${SSHUSER}@${SSHHOST}"
-if [ ! -e ".ssh/id_rsa.pub" ]; then
+if [ ! -e ".ssh/id_rsa.pub" ]
+then
mkdir .ssh >/dev/null 2>/dev/null
ssh-keygen -q -t rsa -N '' -f .ssh/id_rsa
- sync
+ sleep 1
fi
-if [ ! -e ".ssh/id_rsa.pub" ]; then
- echo "ERROR: Failed creating .ssh/id_rsa.pub"
- touch /tmp/.ssh-auth-failed
+if [ ! -e ".ssh/id_rsa.pub" ]
+then
+echo "ERROR: Failed creating .ssh/id_rsa.pub"
+ read tmp
exit 150
fi
@@ -38,4 +40,6 @@ if [ $? -ne 0 ] ; then
else
rm /tmp/.ssh-auth-failed >/dev/null 2>/dev/null
fi
-exit 0
+
+echo "Press ENTER to continue"
+read tmp

0 comments on commit 273d110

Please sign in to comment.