SSH client times out after 5 minutes (RHEL 6.6)

Latest response

I’m stumped with an issue that I hope someone can point me in the right direction. SSH sessions keep timing out after 5 minutes on a RHEL 6.6 system. ClientInterval is set to 900, ClientAliveCountMax is set to 0. I have checked the TMOUT variable and it is set to 900. TCPKeepAlive is set to yes but is commented out. Even uncommented it is still dropping at 5 minutes. I'm not sure where else to look. A co-worker mentioned that it was compiled in the kernel but I have done a kernel upgrade to 2.6.32-642.3.1.el6.x86_64 from Red Hat and it still exists.

Any help or guidance is appreciated.

Thanks
Robert

Responses

so you're ssh'ing from one redhat box to another redhat box? or are you ssh'ing from a desktop to the redhat 6 box?

have you read this?: https://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/

I am ssh'ing from one server to another. I have read that article as well as others about ServerAliveInterval and ServerAliveCountMax. I'm trying to figure out why one server allows me to stay connected for 15 minutes and one only 5 minutes when ClientAliveInterval is set to 900 on both servers. In fact both servers have the same identical sshd_config file.

Are the connections you're comparing across the same network path? It may be a timeout in a network device, and not related to the ssh configuration at all.

all of my experience with ssh problems have been network related. 1) firewalls too busy and drop connections randomly. 2) install new firewalls and by default they disconnect ssh after 5 minutes

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.