修改ssh连接时用户为root
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user