This is a huge problem with no clear resolution.
A paper published by The University of Texas at Austin covers some scenarios with mix networks (like Tor). It suggests using adaptive padding but it's not a bullet proof solution. It's still prone to analysis attacks and isn't necessarily suitable for many types of traffic because of potentially high latency costs. Adaptive padding also doesn't address weaknesses against active attackers who can, for example, watermark traffic.
Another great article published by the InfoSec Institute regarding timing analysis attacks in mix networks suggests countermeasure which don't appear bullet proof for applications like ssh.
Timing Analysis of Keystrokes and Timing
Attacks on SSH lists three countermeasures for keystroke traffic specifically:
- Send dummy packets when users are typing password
- Signature attack will fail
- Inter-keystroke timing information is still available to the user
- For every keystroke, delay random time before sending out the
packet
- Randomize the timing information of the keystrokes
- Won’t work if the attacker can monitor the user login many times and
compute the average of the latencies
- Send packets at constant rate
- Breaks the responsiveness
For arbitrary traffic option 3 appears to be the most secure and potentially fool proof choice although it still would have high (maybe too high) costs.
End of the story appears that anything other than a uniform stream can potentially leak data about traffic.
I can't find any documentation on ssh implementing any countermeasure against timing analysis attacks.