Added TODO about public key removal logic.

pull/7287/head
Stephen Fox 7 years ago
parent f9d24ccda0
commit e40aa515f2

@ -38,6 +38,7 @@ func (s *StepCleanupTempKeys) Run(_ context.Context, state multistep.StateBag) m
ui.Say("Trying to remove ephemeral keys from authorized_keys files")
// TODO: Why create a backup file if you are going to remove it?
cmd.Command = fmt.Sprintf("sed -i.bak '/ %s$/d' ~/.ssh/authorized_keys; rm ~/.ssh/authorized_keys.bak", s.Comm.SSHTemporaryKeyPairName)
if err := cmd.StartWithUi(comm, ui); err != nil {
log.Printf("Error cleaning up ~/.ssh/authorized_keys; please clean up keys manually: %s", err)

Loading…
Cancel
Save