SSH session stays active after client request timeout in Teleport
0 reputation · 15 Oct 2021, 17:05 UTC
Symptom
When a Teleport client cancels an SSH connection request—either by exceeding a context deadline or by explicit cancellation—the SSH session on the server may remain active until the server‑side idle timeout expires.
Goal
Determine whether Teleport provides a mechanism to terminate an established SSH session immediately when the client‑side request context is cancelled, without waiting for the idle timeout.
Constraints and Uncertainty
The current behavior relies on the `idle_timeout` setting; there is no documented setting that forces immediate session closure on RPC context cancellation. It is unclear if lowering `idle_timeout` to zero achieves instant termination or disables the timeout altogether, and whether the client can send a signal that the server honors instantly upon request cancellation.
- Is there a server‑side configuration that causes the SSH session to be closed as soon as the associated RPC context is cancelled?
- Does setting `idle_timeout` to zero result in immediate session termination, or does it disable the timeout mechanism?
- Can the client trigger an immediate SSH disconnect (e.g., by sending a SSH_MSG_DISCONNECT) that the server honors right after request cancellation?