I see there are 3 parameters of importance in the ssh_config file :
TCPKeepalive ServerAliveInterval ServerAliveCountMax
1) When I try ssh with tcpkeepalive=yes, the ssh conenction does not get disconnected within in 140 secs even though the tcp_keepalive parameters are set as:
tcp_keepalive_intvl 20 tcp_keepalive_probes 5 tcp_keepalive_time 40
What do I need to check for to see why the disconnect is not happening within 140 secs ?
2) Can we use all the above 3 parameters at the same time ? Or should we use either the TCP timeout or the ssh server alive parameters ? If I use only the serveralive* parameters, the disconnect happens pretty quick. But I am seeing why the tcpkeepalive timeout is not happening.
Can you please help ?