Added TODO about public key removal logic.
This commit is contained in:
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")
|
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)
|
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 {
|
if err := cmd.StartWithUi(comm, ui); err != nil {
|
||||||
log.Printf("Error cleaning up ~/.ssh/authorized_keys; please clean up keys manually: %s", err)
|
log.Printf("Error cleaning up ~/.ssh/authorized_keys; please clean up keys manually: %s", err)
|
||||||
|
|
Loading…
Reference in New Issue