summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Ogden <bernie.ogden@linaro.org>2015-07-10 18:22:25 +0200
committerBernard Ogden <bernie.ogden@linaro.org>2015-07-10 18:22:25 +0200
commit55b1c639379090e261ccaafd207d5a3bec829595 (patch)
treee984456409904e43da3116a4c3211569f2cc2a7c
parentc657774ad43f8281f28dfa542ac1840f57585aa7 (diff)
Use the existing onetime key to permit localhost login
Change-Id: I5b8295fc40e4c7f0998146aa412ed617e6bbdcf5
-rwxr-xr-xinvoke_session_debian14
1 files changed, 8 insertions, 6 deletions
diff --git a/invoke_session_debian b/invoke_session_debian
index 253ae11..9abc453 100755
--- a/invoke_session_debian
+++ b/invoke_session_debian
@@ -49,12 +49,6 @@ fi
#Expect local sources
sed -i 's#ssh://git@dev-private\.git\.linaro\.org#ssh://localhost/~/benchsrc/#' ~/src/abe/config/sources.conf || exit 1
-#Need to be able to ssh to self to get local sources
-if ! ssh -o StrictHostKeyChecking=no localhost true; then
- echo "Failed to ssh to self" >&2
- exit 1
-fi
-
#Generate one-time key
mkdir ~/data || exit 1
if ! ssh-keygen -P '' -f ~/data/onetime < /dev/null; then
@@ -63,6 +57,14 @@ if ! ssh-keygen -P '' -f ~/data/onetime < /dev/null; then
fi
export LAVA_SSH_KEYFILE=${HOME}/data/onetime
+#Need to be able to ssh to self to get local sources
+#Can reuse the onetime key for this
+cat ~/data/onetime.pub >> ~/.ssh/authorized_keys
+if ! ssh -o StrictHostKeyChecking=no localhost true; then
+ echo "Failed to ssh to self" >&2
+ exit 1
+fi
+
echo "*** WAITING FOR SOURCE: ${ip_addr}"
while ! -e /tmp/benchsrc_lock; do inotifywait -e create /tmp; done
echo ""