fix
This commit is contained in:
parent
9dfbbe58ff
commit
232018c925
@ -537,13 +537,16 @@ export async function createRemoteEngineConfiguration(id: string) {
|
|||||||
const config = sshConfig.parse('');
|
const config = sshConfig.parse('');
|
||||||
const Host = `${remoteIpAddress}-remote`
|
const Host = `${remoteIpAddress}-remote`
|
||||||
|
|
||||||
await asyncExecShell(`ssh-keygen -R ${Host}`);
|
try {
|
||||||
await asyncExecShell(`ssh-keygen -R ${remoteIpAddress}`);
|
await asyncExecShell(`ssh-keygen -R ${Host}`);
|
||||||
await asyncExecShell(`ssh-keygen -R localhost:${localPort}`);
|
await asyncExecShell(`ssh-keygen -R ${remoteIpAddress}`);
|
||||||
|
await asyncExecShell(`ssh-keygen -R localhost:${localPort}`);
|
||||||
|
} catch (error) { }
|
||||||
|
|
||||||
|
|
||||||
const found = config.find({ Host });
|
const found = config.find({ Host });
|
||||||
const foundIp = config.find({ Host: remoteIpAddress });
|
const foundIp = config.find({ Host: remoteIpAddress });
|
||||||
|
|
||||||
if (found) config.remove({ Host })
|
if (found) config.remove({ Host })
|
||||||
if (foundIp) config.remove({ Host: remoteIpAddress })
|
if (foundIp) config.remove({ Host: remoteIpAddress })
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user