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) {