cosmestic

This commit is contained in:
Mikaël Cluseau 2023-02-12 18:59:14 +01:00
parent 11f3c953e2
commit 1672b901d4

View File

@ -54,16 +54,17 @@ genLoop:
os.Remove(outPath + ".pub")
}
removeTemp()
removeTemp()
defer removeTemp()
var out, privKey, pubKey []byte
out, err = exec.Command("ssh-keygen",
cmd := exec.Command("ssh-keygen",
"-N", "",
"-C", "root@"+host,
"-f", outPath,
"-t", keyType).CombinedOutput()
"-t", keyType)
out, err = cmd.CombinedOutput()
if err != nil {
err = fmt.Errorf("ssh-keygen failed: %v: %s", err, string(out))
return