Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

ClientAliveInterval ClientAliveCountMax

Subject: ClientAliveInterval ClientAliveCountMax
Date: Thu, 6 Dec 2007 18:13:57 -0500
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@openssh.com   << 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@openssh.com
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@openssh.com
debug2: channel 0: request keepalive@openssh.com
debug2: channel 0: request keepalive@openssh.com
debug2: channel 0: request keepalive@openssh.com
debug2: channel 0: request keepalive@openssh.com
debug2: channel 0: request keepalive@openssh.com
debug2: channel 0: request keepalive@openssh.com
debug2: channel 0: request keepalive@openssh.com
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@us.ibm.com 

<Prev in Thread] Current Thread [Next in Thread>
  • ClientAliveInterval ClientAliveCountMax, Richard Blasiak <=