{"id":3855,"date":"2019-05-10T12:01:29","date_gmt":"2019-05-10T11:01:29","guid":{"rendered":"https:\/\/ed.gs\/?p=3855"},"modified":"2019-10-01T22:27:28","modified_gmt":"2019-10-01T21:27:28","slug":"kill-inactive-ssh-sessions","status":"publish","type":"post","link":"https:\/\/ed.gs\/2019\/05\/10\/kill-inactive-ssh-sessions\/","title":{"rendered":"Kill Inactive SSH Sessions"},"content":{"rendered":"

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 .\/kill-session.sh after modifying it to your required timeframe, that’s all there is to it.<\/p>\n