What's Changed
New Features
-
Regex captures in Expect. Add
ExpectRegex?to match raw server output using Go regular expressions and capture dynamic content for subsequent automated interactions. Support globally numbered captures (%1,%{10}) and named captures (%{name}), which can be referenced inExpectSendText?. (#294) -
Colored terminal session previews. Preserve ANSI colors and text styling in terminal previews when attaching to an existing session.
-
Zstandard compression for UDP sessions. Enable Zstandard compression for session output by default when supported by the server. Set
UdpCompression noneto disable compression. (tsshd#49) -
Dual-stack IPv4/IPv6 connections. Support connecting and reconnecting over both IPv4 and IPv6. Unless explicitly restricted with
-4,-6, orAddressFamily, race both address families and use the first successfully authenticated connection. (#293) -
Configurable keep-alive scheduling. Add
ServerAliveAlways yesto send keep-alives at everyServerAliveInterval, regardless of whether server output is continuously arriving. This helps maintain connections through proxies and bastions that only track client-to-server activity. The default behavior remains unchanged. (#297)
Security
-
Fix DNSSEC host key verification bypass. When
VerifyHostKeyDNS yesis enabled, only match SSH host keys against SSHFP records covered by the validated DNSSEC signature. Prevent unsigned records from bypassing host key verification. (#298) -
Fix KCP packet reflection and replay vulnerability. Introduce KCP protocol v3 with separate encryption keys for each traffic direction, derived using the client ID and a fresh client nonce. Add packet-number-based replay protection to prevent reflected or replayed packets from being accepted as client input. (tsshd#53)
-
Prevent proxy authentication reflection attacks. Harden proxy authentication in attachable mode by reserving the server ID, validating client IDs, and rejecting reflected or conflicting authentication acknowledgements. (tsshd#57)
Reliability Improvements
-
Improve terminal job control on Unix. Properly handle foreground and background process transitions, restore stdin raw mode and resume input forwarding when returning to the foreground, and redraw the remote screen. Add safeguards against repeated foreground detection and raw-mode restoration failures.
-
Bound UDP client startup time. Apply a single
ConnectTimeoutdeadline across transport establishment, protocol initialization, bus setup, and stream handshakes. Propagate cancellation through dialing and packet writes, and clean up transports and rekey resources on failure. (tsshd#51)
Bug Fixes
-
Fix keep-alive timeouts with ProxyCommand. Correctly update server activity timestamps when reading through ProxyCommand connections, preventing active connections from being incorrectly terminated after
ServerAliveInterval * ServerAliveCountMaxseconds. (#296) -
Improve UDP timeout detection. Prevent heartbeat timeout detection from being delayed indefinitely by system clock jumps.
-
Fix TCP session exit status and suppress normal exit warnings. Return the actual remote command exit status instead of always reporting
0, and avoid displaying warnings for normal command exits, including non-zero exit statuses. Continue reporting signal-related exits and other abnormal connection errors. -
Preserve redirected binary streams on Windows. Apply console-specific input/output processing only when the corresponding standard stream is an actual terminal, preserving binary data when stdin, stdout, or stderr is redirected. (#295)
-
Silence warnings for malformed
known_hostsentries. Rely on the upstreamx/cryptoimplementation to skip malformed entries when valid entries are present, without producing warnings or requiring a custom workaround.
Compatibility Notes
-
KCP security upgrade: The KCP protocol v3 reflection and replay protection requires both
tsshandtsshdto be upgraded. Older clients remain compatible but continue using the legacy shared-key protection without the new v3 security improvements. -
Zstandard compression: Compression is negotiated based on server support. Older servers continue to work without requiring compression.
New Contributors
- @AdamsGH made their first contribution in #295
- @youncyb made their first contribution in #294
- @kitknox made their first contribution in #298
Full Changelog: v0.1.27...v0.1.28