修复了ssh私钥登录失败的问题

This commit is contained in:
dushixiang
2020-12-28 22:39:54 +08:00
parent 0dbdaf1489
commit d132a0ac65
6 changed files with 21 additions and 5 deletions

View File

@ -58,7 +58,6 @@ func AssetUpdateEndpoint(c echo.Context) error {
item.PrivateKey = "-"
item.Passphrase = "-"
case "private-key":
item.Username = "-"
item.Password = "-"
item.CredentialId = "-"
case "custom":

View File

@ -91,6 +91,7 @@ func TunEndpoint(c echo.Context) error {
break
case "ssh":
if len(session.PrivateKey) > 0 && session.PrivateKey != "-" {
configuration.SetParameter("username", session.Username)
configuration.SetParameter("private-key", session.PrivateKey)
configuration.SetParameter("passphrase", session.Passphrase)
} else {