diff --git a/src/remote-container.ts b/src/remote-container.ts index 059c098..5900ea5 100644 --- a/src/remote-container.ts +++ b/src/remote-container.ts @@ -92,7 +92,8 @@ export default class RemoteContainer { } else { console.log(`[RemoteContainer] Running in local environment, attempting firstConnect`); try { - await this.firstConnect(host, hostname, username, port) + //传入真实IP + await this.firstConnect(host, '192.168.10.4', username, port) .then((res) => { if (res === 'success') { console.log(`[RemoteContainer] firstConnect succeeded, opening remote folder`); @@ -318,7 +319,7 @@ export default class RemoteContainer { let terminal = vscode.window.activeTerminal || vscode.window.createTerminal(`Ext Terminal`); terminal.show(true); - const command = `code --remote ssh-remote+${username}@${host}:${port} ${path} --reuse-window`; + const command = `code --remote ssh-remote+root@${host}:${port} ${path} --reuse-window`; console.log(`[RemoteContainer] Sending command to terminal: ${command}`); // 在原窗口打开