diff --git a/terminus-ssh/src/services/ssh.service.ts b/terminus-ssh/src/services/ssh.service.ts index 0a180654..d65658d2 100644 --- a/terminus-ssh/src/services/ssh.service.ts +++ b/terminus-ssh/src/services/ssh.service.ts @@ -116,8 +116,9 @@ export class SSHService { 'ssh-keygen.exe', ) await execFile('icacls', [temp.path, '/inheritance:r']) - let sid = await execFile('whoami', ['/user', '/nh']) - sid = sid[0].split(' ')[0] + let sid = await execFile('whoami', ['/user', '/nh', '/fo', 'csv']) + sid = sid[0].split(',')[0] + sid = sid.substring(1, sid.length - 1) await execFile('icacls', [temp.path, '/grant:r', `${sid}:(R,W)`]) }