MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / GetSSHkeyPolicyIdRsa

Function GetSSHkeyPolicyIdRsa

cli/pkg/common/sshremote.go:616–634  ·  view source on GitHub ↗
(host string, token string, ownerGuid string)

Source from the content-addressed store, hash-verified

614}
615
616func GetSSHkeyPolicyIdRsa(host string, token string, ownerGuid string) (err error, idRsa string) {
617 var ws []WorkspacePolicy
618 ws, err = GetWSPolicies("2", host, token, ownerGuid)
619 CheckError(err)
620
621 if len(ws) > 0 {
622 detail := Detail{}
623 if ws[len(ws)-1].Detail != "" {
624 err = json.Unmarshal([]byte(ws[len(ws)-1].Detail), &detail)
625 if err == nil {
626 idRsa = detail.IdRsa
627 }
628 //
629 }
630
631 }
632 return err, idRsa
633 // 远程公私钥都不为空
634}
635
636// ExecSSHSetPasswordPolicy
637// func GetBasicPassword(host string, token string, ownerGuid string) (password string, err error) {

Callers

nothing calls this directly

Calls 2

GetWSPoliciesFunction · 0.85
CheckErrorFunction · 0.85

Tested by

no test coverage detected