SSH Timeouts on DOCSIS 3 (Virgin Media 50Mb, 100Mb, 120Mb)

Since moving to Virgin’s 120Mb Broadband my SSH connections would drop after 30 seconds of inactivity. This made some grey hairs appear on the side of my head.

This happens due to the way Virgin handle the Internet traffic on their DOCSIS 3 network, as opposed to lower broadband speeds that use the DOCSIS 1 network.

I’ve managed to solve this by altering the client time out parameters in the SSHD config on each server.

Open up /etc/ssh/sshd_config and find the two parameters ClientAliveInterval  and ClientAliveCountMax.
I changed mine to the following

[codesyntax lang=”bash”]
ClientAliveInterval 30
ClientAliveCountMax 4

Restart SSH

[codesyntax lang=”bash”]
service sshd reload

Restart your SSH connection and you will no longer have SSH timeouts on Virgin Media.

Author: Kieran Barnes

Kieran is a PHP developer with 15 years commercial experience. Specialist in WordPress, CakePHP, CubeCart and all things PHP.

2 thoughts on “SSH Timeouts on DOCSIS 3 (Virgin Media 50Mb, 100Mb, 120Mb)”

  1. Thanks, this has been bugging me since the upgrade from 10Mb (on DOCSIS1) to 30Mb (on DOCSIS3). Changing the settings makes a world of difference. Ta!

  2. I read about this DOCSIS3 stuff when I switched to Virgin and found my ssh sessions dropping. Because I don’t own all the servers I log into changing all the server configs wasn’t an option.

    Eventually I switched my “Super Hub” into cable modem mode and installed a new TL-WR841N / TL-WR841ND router behind it. Since then it has been rock solid with no dropped connections to anywhere.

    I strongly suspect that the “Super Hub” is far from “super” and actually drops open connections to save memory.

Leave a Reply

Your email address will not be published. Required fields are marked *