From 6b4b6b522f84206eefe07cb29acd4f0efb8ab0f3 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Mon, 2 Mar 2020 16:21:37 +0100 Subject: [PATCH] reset permissions on key file (fixes #2201) --- terminus-ssh/src/services/ssh.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terminus-ssh/src/services/ssh.service.ts b/terminus-ssh/src/services/ssh.service.ts index 35e5fb58..c71f6bf5 100644 --- a/terminus-ssh/src/services/ssh.service.ts +++ b/terminus-ssh/src/services/ssh.service.ts @@ -109,6 +109,8 @@ export class SSHService { 'ssh-keygen', 'ssh-keygen.exe', ) + await execFile('icacls', [temp.path, '/inheritance:r']) + await execFile('icacls', [temp.path, '/grant:r', `${process.env.USERNAME}:(R)`]) } await execFile(sshKeygenPath, [