From d04e7ea4f3fce0c787c3eed6f1840b402435113c Mon Sep 17 00:00:00 2001 From: James Slagle Date: Tue, 29 May 2018 08:53:19 -0400 Subject: [PATCH] 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 --- deployed-server/scripts/enable-ssh-admin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployed-server/scripts/enable-ssh-admin.sh b/deployed-server/scripts/enable-ssh-admin.sh index bd36ade755..f9b737aa25 100755 --- a/deployed-server/scripts/enable-ssh-admin.sh +++ b/deployed-server/scripts/enable-ssh-admin.sh @@ -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"