feat(ssh): support ssh known hosts file (#6263)

This commit is contained in:
Louis Ruch authored and GitHub committed 2025-11-19 16:24:20 -08:00
1 parent 6533c8bdb3
commit 4bae4f23f5
7 files changed
+281 -2

No files matched your search

+7 -1
View File
@@ -280,7 +280,13 @@ func (w *Worker) handleProxy(listenerCfg *listenerutil.ListenerConfig, sessionMa
conn.Close(proxyHandlers.WebsocketStatusProtocolSetupError, "error getting decryption function")
event.WriteError(ctx, op, err)
}
runProxy, err := handleProxyFn(ctx, ctx, decryptFn, cc, pDialer, acResp.GetConnectionId(), protocolCtx, w.recorderManager, proxyHandlers.WithLogger(w.logger))
handlerOpts := []proxyHandlers.Option{proxyHandlers.WithLogger(w.logger)}
if cb := w.SshKnownHostsCallback.Load(); cb != nil {
handlerOpts = append(handlerOpts, proxyHandlers.WithSshHostKeyCallback(*cb))
}
runProxy, err := handleProxyFn(ctx, ctx, decryptFn, cc, pDialer, acResp.GetConnectionId(), protocolCtx, w.recorderManager, handlerOpts...)
if err != nil {
conn.Close(proxyHandlers.WebsocketStatusProtocolSetupError, "unable to setup proxying")