Fixing multiple remotes breaking the server overview

This commit is contained in:
David Koch Gregersen 2023-03-06 22:31:01 +01:00
parent 1190cb4ea1
commit eee201013c

View File

@ -510,7 +510,9 @@ export async function createRemoteEngineConfiguration(id: string) {
remoteUser
} = await prisma.destinationDocker.findFirst({ where: { id }, include: { sshKey: true } });
await fs.writeFile(sshKeyFile, decrypt(privateKey) + '\n', { encoding: 'utf8', mode: 400 });
const config = sshConfig.parse('');
const currentConfigFileContent = (await fs.readFile(`${homedir}/.ssh/config`)).toString();
const config = sshConfig.parse(currentConfigFileContent.toString());
const Host = `${remoteIpAddress}-remote`;
try {