May 10, 2019

Kill Inactive SSH Sessions

I couldn’t find anything online that would kill all idle SSH sessions after a specified timeframe that I could shove in cron, so I wrote the following to accomplish it. It’s fully documented, but if you require any assistance with it, leave a comment here or on Github. Run with ./ after modifying it to your required timeframe, that’s all there is to it.

Leave a Reply

Your email address will not be published. Required fields are marked *