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

Function loadSSHLogSessionKey

agent/app/service/ssh.go:1433–1444  ·  view source on GitHub ↗
(header sshLogHeader, data dto.SSHHistory, line string)

Source from the content-addressed store, hash-verified

1431}
1432
1433func loadSSHLogSessionKey(header sshLogHeader, data dto.SSHHistory, line string) string {
1434 if header.Process == "sshd-session" && data.Address != "" && data.Port != "" {
1435 return data.Address + ":" + data.Port
1436 }
1437 if header.PID != "" {
1438 return "pid:" + header.PID
1439 }
1440 if data.Address != "" && data.Port != "" {
1441 return data.Address + ":" + data.Port
1442 }
1443 return line
1444}
1445
1446func normalizeSSHLogDate(dateStr string) string {
1447 if t, err := time.Parse(time.RFC3339Nano, dateStr); err == nil {

Callers 1

parseSSHLogLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected