Update oputil_ssh_key.js per feedback

This commit is contained in:
Carl Hultay
2024-11-23 19:08:05 -05:00
committed by GitHub
parent 2c85a9bb51
commit bc418ff422

View File

@@ -105,10 +105,8 @@ function createNew(cb) {
ui.log.write(`Creating SSH Key: ${targetKeyFile}`);
// Create Dir
if (!fs.pathExists(sshKeyPath)) {
ui.log.write(`Creating Directory: ${sshKeyPath}`);
exec(`mkdir -p ${sshKeyPath}`);
}
ui.log.write(`Creating Directory: ${sshKeyPath}`);
fs.ensureDirSync(sshKeyPath);
// Create SSH Keys
const command = `openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537 | openssl rsa -out ./${targetKeyFile} -aes128 -traditional -passout pass:`;