MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetSSHInfo

Method GetSSHInfo

agent/app/service/ssh.go:89–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89func (u *SSHService) GetSSHInfo() (*dto.SSHInfo, error) {
90 data := dto.SSHInfo{
91 AutoStart: true,
92 IsExist: true,
93 IsActive: true,
94 Message: "",
95 Port: "22",
96 ListenAddress: "",
97 PasswordAuthentication: "yes",
98 PubkeyAuthentication: "yes",
99 PermitRootLogin: "yes",
100 UseDNS: "yes",
101 }
102 loadSSHServiceStatus(&data)
103 loadSSHConfigInfo(&data)
104 data.CurrentUser = loadCurrentUserName()
105 return &data, nil
106}
107
108func (u *SSHService) OperateSSH(operation string) error {
109 serviceName, err := loadServiceName()

Callers

nothing calls this directly

Calls 3

loadSSHServiceStatusFunction · 0.85
loadSSHConfigInfoFunction · 0.85
loadCurrentUserNameFunction · 0.85

Tested by

no test coverage detected