mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-08 14:37:29 +08:00
fix: Fix the issue of terminal key connection exception (#10318)
This commit is contained in:
parent
2258ba108d
commit
1fc0f1c71b
2 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/agent/app/dto"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/model"
|
||||
"github.com/1Panel-dev/1Panel/agent/buserr"
|
||||
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||
"github.com/1Panel-dev/1Panel/agent/utils/encrypt"
|
||||
|
@ -113,6 +114,8 @@ func (u *SettingService) SaveConnInfo(req dto.SSHConnData) error {
|
|||
}
|
||||
defer client.Close()
|
||||
|
||||
var connItem model.LocalConnInfo
|
||||
_ = copier.Copy(&connItem, &req)
|
||||
localConn, _ := json.Marshal(&connInfo)
|
||||
connAfterEncrypt, _ := encrypt.StringEncrypt(string(localConn))
|
||||
_ = settingRepo.Update("LocalSSHConn", connAfterEncrypt)
|
||||
|
|
|
@ -94,8 +94,8 @@ const search = async () => {
|
|||
form.port = res.data.port;
|
||||
form.authMode = res.data.authMode;
|
||||
form.password = Base64.decode(res.data.password);
|
||||
form.privateKey = res.data.privateKey;
|
||||
form.passPhrase = res.data.passPhrase;
|
||||
form.privateKey = Base64.decode(res.data.privateKey);
|
||||
form.passPhrase = Base64.decode(res.data.passPhrase);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue