SSH认证--私钥认证方式增加用户名选项

This commit is contained in:
GoEdgeLab
2021-06-30 14:56:36 +08:00
parent bb1739d042
commit 799aa13e37
7 changed files with 25 additions and 5 deletions

View File

@@ -184,6 +184,7 @@ func (this *Queue) InstallNode(nodeId int64, installStatus *models.NodeInstallSt
Username: grant.Username,
Password: grant.Password,
PrivateKey: grant.PrivateKey,
Method: grant.Method,
})
if err != nil {
installStatus.ErrorCode = "SSH_LOGIN_FAILED"
@@ -272,6 +273,7 @@ func (this *Queue) StartNode(nodeId int64) error {
Username: grant.Username,
Password: grant.Password,
PrivateKey: grant.PrivateKey,
Method: grant.Method,
})
if err != nil {
return err
@@ -376,6 +378,7 @@ func (this *Queue) StopNode(nodeId int64) error {
Username: grant.Username,
Password: grant.Password,
PrivateKey: grant.PrivateKey,
Method: grant.Method,
})
if err != nil {
return err