diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 19:09:27 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 19:09:27 +0200 |
| commit | ec1504e0cedbfeffc35e50a09633e51e93bf0e2d (patch) | |
| tree | edd7259fc8eacd10b2bc3015096548c8fc36d461 /internal/ssh/client | |
| parent | 5d1b9f1062d38c301c0995ec6da980bdf5e48332 (diff) | |
more on this
Diffstat (limited to 'internal/ssh/client')
| -rw-r--r-- | internal/ssh/client/knownhostscallback.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/ssh/client/knownhostscallback.go b/internal/ssh/client/knownhostscallback.go index 26ab245..45451ea 100644 --- a/internal/ssh/client/knownhostscallback.go +++ b/internal/ssh/client/knownhostscallback.go @@ -95,7 +95,9 @@ func (c *KnownHostsCallback) Wrap() ssh.HostKeyCallback { ipLine: knownhosts.Line([]string{remote.String()}, key), responseCh: make(chan response), } - dlog.Client.Warn("Encountered unknown host", unknown) + // Keep host trust discovery diagnostics out of normal command output. + // In trust-all and plain modes this warning can corrupt tool output. + dlog.Client.Debug("Encountered unknown host", unknown.server, unknown.remote.String()) // Notify user that there is an unknown host c.unknownCh <- unknown // Wait for user input. @@ -148,7 +150,8 @@ func (c *KnownHostsCallback) promptAddHosts(hosts []unknownHost) { select { case <-c.trustAllHostsCh: - dlog.Client.Warn("Trusting host keys of servers", servers) + // Trust-all mode is non-interactive; avoid warning-level noise on stdout. + dlog.Client.Debug("Trusting host keys of servers", servers) c.trustHosts(hosts) return default: |
