Originally published at: How to Kill Inactive SSH Sessions
So, you’ve been disconnected from your server a couple of times, resulting in inactive ssh sessions. You know this because when you use the “w” command, you see something like the following… 22:47:28 up 315 days, 21:09, 2 users, load average: 9.04, 8.17, 7.30 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 ipxxx-xxx-xxx-xxx 23:54 26:40…
1 Like
For me, pstree -p
worked. And then, I added ClientAliveInterval 600
to /etc/ssh/sshd_config.d/timeout.conf
file, instead of messing-up with /etc/ssh/sshd_config
. The file name could be anything. Thanks for the great site. I just found the community as well through the linked article.