Use user specified private key when deleting temp keys

We use the user specified private key when we inject the temporary ssh
key, and we should also use it when we delete the temprorary ssh keys.
Even though this script is no longer used on master, we should commit
this so we can backport to queens.

Change-Id: Id389984b87209f959e4cf439abd8165a3a08ead3
Closes-Bug: #1773980
This commit is contained in:
James Slagle 2018-05-29 08:53:19 -04:00
parent 0edc478348
commit d04e7ea4f3

View File

@ -81,7 +81,7 @@ echo # newline after the previous dots
for HOST in $OVERCLOUD_HOSTS; do
echo "Removing TripleO short term key from $HOST"
ssh $SSH_TIMEOUT_OPTIONS $SSH_HOSTKEY_OPTIONS -l "$OVERCLOUD_SSH_USER" "$HOST" "sed -i -e '/$SHORT_TERM_KEY_COMMENT/d' \$HOME/.ssh/authorized_keys"
ssh $SSH_TIMEOUT_OPTIONS $SSH_HOSTKEY_OPTIONS -i "$OVERCLOUD_SSH_KEY" -l "$OVERCLOUD_SSH_USER" "$HOST" "sed -i -e '/$SHORT_TERM_KEY_COMMENT/d' \$HOME/.ssh/authorized_keys"
done
echo "Removing short term keys locally"