ClientAliveInterval ClientAliveCountMax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings;
   I put the following in my sshd_config file believing that any session 
would time out in 2 minutes if the server could not communicate with
the client. 

ClientAliveCountMax 8
ClientAliveInterval 15

However I found that if the server continually attempts to send some data 
to the client this does not work.  The connection stays up for hours.
I started sshd with the  -d -d -d switches to collect some trace.  I 
looked in the trace for the entry that shows the heartbeat msg being sent 
to the client
but it does not appear in the trace: 
debug2: channel 0: request keepalive@xxxxxxxxxxx   << I never see trace 
entry this for this scenario 

[ to break the connection I pull the ethernet cable between the network 
switch and the SSH Client workstation]
[ to create some continuous traffic to send I execute the command "ping 
localhost" ] 


Otherwise  the ClientAlive mechanism seems to work :
I found that if there is a period of 15 minutes with NO activity and the 
client is 
connected the trace shows: 

debug2: channel 0: request keepalive@xxxxxxxxxxx
debug1: Got 100/13 for keepalive

If the server is not attempting to send data to the client and I pull the 
cable between the network switch and the client I get a timeout after 2 
minutes 
as expected:
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
debug2: channel 0: request keepalive@xxxxxxxxxxx
Disconnecting: Timeout, your session not responding.
debug3: channel 0: close_fds r 9 w 9 e 11
debug1: do_cleanup
debug1: PAM: cleanup
debug3: PAM: sshpam_thread_cleanup entering

Any suggestions?



 OpenSSH level:     SSH-2.0-OpenSSH_3.8p1
 Distro   SuSe SLES 9.3


Thanks, Rick 

blasiak@xxxxxxxxxx 


[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux