From ece4943d2ade6311cad63793d0ee8f62afe8e5b2 Mon Sep 17 00:00:00 2001 From: yinxue <2643126914@qq.com> Date: Mon, 3 Nov 2025 14:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ssh=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=E7=94=A8=E6=88=B7=E4=B8=BAroot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remote-container.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote-container.ts b/src/remote-container.ts index 5119c9f..059c098 100644 --- a/src/remote-container.ts +++ b/src/remote-container.ts @@ -169,7 +169,7 @@ export default class RemoteContainer { // connect with key await ssh.connect({ host: hostname, - username: username, + username: 'root', port: port, privateKeyPath: this.user.getUserPrivateKeyPath(), readyTimeout: 30000, // 增加超时时间到30秒 @@ -236,7 +236,7 @@ export default class RemoteContainer { // only connect successfully then save the host info console.log(`[RemoteContainer] Storing project SSH info`); - await this.storeProjectSSHInfo(host, hostname, port, username) + await this.storeProjectSSHInfo(host, hostname, port, 'root') resolve('success') } catch (error) {