Use user specified ssh key when removing tmp key

enable_ssh_admin was not using the user specified ssh key when removing
the generated tmp key. This could result in a permission denied error.

Change-Id: I3bd4ed6c58d6bffef811ee7ebc317056b34f2d3c
Closes-Bug: #1785704
This commit is contained in:
James Slagle 2018-08-06 16:28:12 -04:00
parent 60d512ae19
commit 26f5497475
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ def enable_ssh_admin(log, clients, hosts, ssh_user, ssh_key):
for host in hosts:
rm_tmp_key_command = ["ssh"] + ssh_options.split()
rm_tmp_key_command += \
["-l", ssh_user, host,
["-i", ssh_key, "-l", ssh_user, host,
"sed -i -e '/%s/d' $HOME/.ssh/authorized_keys" %
tmp_key_comment]
print("Removing TripleO short term key from %s" % host)