mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: prefer write file
This commit is contained in:
@@ -38,9 +38,7 @@ export const saveSSHKey = async (
|
|||||||
privateKeyStream.write(privateKey);
|
privateKeyStream.write(privateKey);
|
||||||
privateKeyStream.end();
|
privateKeyStream.end();
|
||||||
|
|
||||||
const publicKeyStream = fs.createWriteStream(publicKeyPath, { mode: 0o400 });
|
fs.writeFileSync(publicKeyPath, publicKey);
|
||||||
publicKeyStream.write(publicKey);
|
|
||||||
publicKeyStream.end();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateSSHKey = async (type: "rsa" | "ed25519" = "rsa") => {
|
export const generateSSHKey = async (type: "rsa" | "ed25519" = "rsa") => {
|
||||||
|
|||||||
Reference in New Issue
Block a user