From 15813d4297f940df6f95e6da9d3e8d6e25815ac8 Mon Sep 17 00:00:00 2001 From: TwiN Date: Tue, 21 Oct 2025 07:37:24 -0400 Subject: [PATCH] fix(client): Add nil check for SSHConfig before validating username/password (#1358) Fixes #1357 --- config/endpoint/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/endpoint/endpoint.go b/config/endpoint/endpoint.go index 1faf3bf1..1ba1c248 100644 --- a/config/endpoint/endpoint.go +++ b/config/endpoint/endpoint.go @@ -498,7 +498,7 @@ func (e *Endpoint) call(result *Result) { result.Duration = time.Since(startTime) } else if endpointType == TypeSSH { // If there's no username/password specified, attempt to validate just the SSH banner - if len(e.SSHConfig.Username) == 0 && len(e.SSHConfig.Password) == 0 { + if e.SSHConfig == nil || (len(e.SSHConfig.Username) == 0 && len(e.SSHConfig.Password) == 0) { result.Connected, result.HTTPStatus, err = client.CheckSSHBanner(strings.TrimPrefix(e.URL, "ssh://"), e.ClientConfig) if err != nil { result.AddError(err.Error())