From 576ff02773a3bb2fb7e607a07d76ce12b3b92055 Mon Sep 17 00:00:00 2001 From: Lorenzo Migliorero Date: Sat, 27 Jul 2024 11:55:28 +0200 Subject: [PATCH] refactor: change ssh private key permission to 600 --- server/utils/filesystem/ssh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/filesystem/ssh.ts b/server/utils/filesystem/ssh.ts index f0315091..ed37badb 100644 --- a/server/utils/filesystem/ssh.ts +++ b/server/utils/filesystem/ssh.ts @@ -33,7 +33,7 @@ export const saveSSHKey = async ( const publicKeyPath = path.join(applicationDirectory, `${id}_rsa.pub`); const privateKeyStream = fs.createWriteStream(privateKeyPath, { - mode: 0o400, + mode: 0o600, }); privateKeyStream.write(privateKey); privateKeyStream.end();