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

@@ -85,6 +85,7 @@ func (this *NodeGrantDAO) CreateGrant(tx *dbs.Tx, adminId int64, name string, me
op.Password = password
op.Su = false // TODO 需要做到前端可以配置
case "privateKey":
op.Username = username
op.PrivateKey = privateKey
}
op.Description = description
@@ -111,6 +112,7 @@ func (this *NodeGrantDAO) UpdateGrant(tx *dbs.Tx, grantId int64, name string, me
op.Password = password
op.Su = false // TODO 需要做到前端可以配置
case "privateKey":
op.Username = username
op.PrivateKey = privateKey
}
op.Description = description