1
0
mirror of https://github.com/smallstep/cli.git synced 2026-10-24 11:19:19 +03:00
Files
step-ca-cli/command/ssh/proxycommand.go
Carl Tashian 5b50ed3b49 Fix proxycommand hang when server closes before stdin closes
proxyDirect waited for both copy goroutines via wg.Wait(). When the
server closes the connection mid-session, the stdin->conn goroutine
stays blocked reading a stdin that never reaches EOF (the ssh client
holds the proxycommand's stdin open until it exits), deadlocking until
an OS-level timeout reaps the process.

Return as soon as either direction finishes instead. Extracted a
testable proxyDirectWithIO and added a regression test.

Fixes #1641

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 08:27:53 -07:00

7.4 KiB