From 48d24fe21ad508fc0186647b916bbb3c77291ade Mon Sep 17 00:00:00 2001 From: Esa Jokinen Date: Tue, 23 Jul 2024 13:24:24 +0300 Subject: [PATCH] find-inactive-ssh-sessions.sh add context in docs --- README.md | 2 +- bin/find-inactive-ssh-sessions.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae868f7..9d59147 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Miscellaneous scripts for different purposes. Mostly unrelated to each other. | Category | Script & Language | Purpose & Usage | |:---|:---|:---| -| Automation | [`find-inactive-ssh-sessions.sh`](bin/find-inactive-ssh-sessions.sh)
Shell (bash) | Find inactive (idle) SSH sessions or kill (`-k`) them.
`find-inactive-ssh-sessions.sh [-k] [-i seconds] [-s]`| +| Automation | [`find-inactive-ssh-sessions.sh`](bin/find-inactive-ssh-sessions.sh)
Shell (bash) | Find inactive (idle) SSH sessions or kill (`-k`) them.
`find-inactive-ssh-sessions.sh [-k] [-i seconds] [-s]`
Could be used as a [workaround](https://serverfault.com/a/1162840/274176) for OpenSSH < 9.2 that did not have the [sshd_config(5)](https://man.openbsd.org/sshd_config) keywords `ChannelTimeout` & `UnusedConnectionTimeout`.| | Email | [`mail-prepender.sh`](bin/mail-prepender.sh)
Shell (bash) | Prepends (to stdin/stdout) email header strings given in as flags `i`, `I`, `a`, or `A`; after possible mbox `From` & `Return-Path` header lines. Intended as a limited `formail` replacement that ignores the nyanses of the flags and simply prepends the valid (RFC 5322, 2.2) non-empty headers keeping the other headers as is. Flags `x` & `X` are implemented. Any other flags are ignored. | | Git | [`git-find-commits-by-file-hash.sh`](bin/git-find-commits-by-file-hash.sh)
Shell (bash) | Search Git repository history for commits with SHA-256 checksum of a file. Answers the question "Has this version of this file ever been committed as the file on this path of this Git repository?" and shows a summary (`git show --stat`) of the matching commit(s). The `path` should be relative to the repository root.
`git-find-commits-by-file-hash.sh sha256sum path`| | Infosec | [`netcat-proxy.sh`](bin/netcat-proxy.sh)
Shell (sh) | Creates a simple persistent TCP proxy with netcat & named pipes.
`netcat-proxy.sh listenport targethost targetport` | diff --git a/bin/find-inactive-ssh-sessions.sh b/bin/find-inactive-ssh-sessions.sh index 9a3ff05..abc8435 100755 --- a/bin/find-inactive-ssh-sessions.sh +++ b/bin/find-inactive-ssh-sessions.sh @@ -11,6 +11,9 @@ read -r -d '' USAGE << EOM # Format: user tty (age)[: PID] # -h Help. Prints this and exits (ignoring all other options). # +# This could be used as a workaround for OpenSSH < 9.2 that did not have +# the sshd_config(5) keywords ChannelTimeout & UnusedConnectionTimeout. +# # Author : Esa Jokinen (oh2fih) # Home : https://github.com/oh2fih/Misc-Scripts # ------------------------------------------------------------------------------