PDC Agent: Native Go SSH Support
The PDC agent now supports a native Go SSH mode, enabled with the -use-gossh flag. This replaces the agent’s reliance on an external OpenSSH process with a direct SSH implementation via Go’s golang.org/x/crypto/ssh library, and brings several improvements:
- Better concurrency within a single agent process. The OpenSSH client process is single-threaded and historically pdc-agent has worked around that limitation with multiple connections (
-connections). The-use-gosshimplementation does not have this limitation and therefore pdc-agent can take better advantage of the host hardware. - More accurate metrics. Metrics are now captured in-process rather than parsed from OpenSSH logs, resulting in more reliable observability data.
- Better connection cleanup and error handling. pdc-agent can now send proper cancellation requests and also receive error codes directly.
- Reduced complexity. The agent no longer needs to spawn or manage an external process, implementing only the SSH functionality required for TCP/IP forwarding.
To enable: Pass the -use-gossh flag when starting the agent.
Note: -use-gossh currently ignores -connections and most -ssh-flag values. However, -permit-domains is another new flag to use with -use-gossh to restrict domain forwarding. There is a “best effort” attempt to support domain restrictions specified in the -ssh-flag style.