Article 4S70Q Killing dead ssh connections

Killing dead ssh connections

by
TNFinfan
from LinuxQuestions.org on (#4S70Q)
I have a monitoring app that utilizes ssh keys to ssh into our linux hosts to run various commands. We have noticed that with some regularity, even though the ssh processes seem to work fine, we are getting open ssh connections that are no longer active.

We are trying to find a way to tell if the connections are still be used in order to terminate them.

I know we could modify the sshd_config directives as follows...

ClientAliveInterval 300
ClientAliveCountMax 0

But we don't want to affect interactive sessions. We only want non-interactive sessions that can easily be identified by the username.

Any ideas?latest?d=yIl2AUoC8zA latest?i=Q54M47-XA48:2_NIm0-zEo4:F7zBnMy latest?i=Q54M47-XA48:2_NIm0-zEo4:V_sGLiP latest?d=qj6IDK7rITs latest?i=Q54M47-XA48:2_NIm0-zEo4:gIN9vFwQ54M47-XA48
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments