7 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
This article explores why SSH sends a large number of packets for a single keystroke, specifically highlighting the impact of keystroke timing obfuscation introduced in 2023. The author investigates performance issues in a high-performance game running over SSH and discovers that the added chaff packets significantly increase CPU and bandwidth usage. Solutions for optimizing SSH performance without compromising security are discussed.
If you do, here's more
SSH can send an astonishing 100 packets for a single keystroke due to a feature introduced in 2023 called keystroke timing obfuscation. This mechanism is designed to enhance security by sending "chaff" packets to obscure the timing of real keystrokes, making it difficult for attackers to deduce what keys were pressed based on typing speed. In a recent experiment, a game developer analyzed the packet flow during SSH sessions and discovered that, during a standard interaction, 66% of the packets were exactly 36 bytes, primarily made up of these chaff packets, alongside TCP acknowledgments.
For a game aiming for high performance, this overhead is problematic. The game is designed to update multiple times per second and handle thousands of concurrent players. When the developer's test harness inadvertently sent a single message instead of regular game updates, the CPU and bandwidth usage dropped significantly. This led to further investigation using tcpdump, which revealed the consistent pattern of packet sizes and timing tied to SSH's obfuscation feature.
To mitigate the performance impact, the developer disabled keystroke obfuscation by passing an option when starting SSH sessions. While this provided immediate relief, it isn't a practical long-term solution for users unfamiliar with such options. A deeper dive into the Go SSH library revealed that the chaff packets are tied to a specific extension, which could potentially be disabled server-side by not advertising it. This approach could streamline the experience for players without compromising performance.
Questions about this article
No questions yet.