修改ssh连接时用户为root
This commit is contained in:
@@ -169,7 +169,7 @@ export default class RemoteContainer {
|
|||||||
// connect with key
|
// connect with key
|
||||||
await ssh.connect({
|
await ssh.connect({
|
||||||
host: hostname,
|
host: hostname,
|
||||||
username: username,
|
username: 'root',
|
||||||
port: port,
|
port: port,
|
||||||
privateKeyPath: this.user.getUserPrivateKeyPath(),
|
privateKeyPath: this.user.getUserPrivateKeyPath(),
|
||||||
readyTimeout: 30000, // 增加超时时间到30秒
|
readyTimeout: 30000, // 增加超时时间到30秒
|
||||||
@@ -236,7 +236,7 @@ export default class RemoteContainer {
|
|||||||
|
|
||||||
// only connect successfully then save the host info
|
// only connect successfully then save the host info
|
||||||
console.log(`[RemoteContainer] Storing project SSH info`);
|
console.log(`[RemoteContainer] Storing project SSH info`);
|
||||||
await this.storeProjectSSHInfo(host, hostname, port, username)
|
await this.storeProjectSSHInfo(host, hostname, port, 'root')
|
||||||
|
|
||||||
resolve('success')
|
resolve('success')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user