From 7f7310729e520702a2bcbf3fefc608a8d173a378 Mon Sep 17 00:00:00 2001 From: steering7253 Date: Sat, 16 May 2026 17:18:48 -0600 Subject: change attempt format --- authorized_keys.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authorized_keys.sh b/authorized_keys.sh index fc89b9f..95b9d4c 100755 --- a/authorized_keys.sh +++ b/authorized_keys.sh @@ -5,12 +5,13 @@ set -o pipefail cd /opt/autopeer NOTIFY_TO="$(python3 -c 'import config; print(config.NOTIFY_TO)')" +echo "[autopeer $(hostname -f)] attempt: $@" | socat stdio "$NOTIFY_TO" + user="$1" if [ "$1" = "new" ]; then type="$2" key="$3" connection="$4" - if user="$(grep -l -s -r -P '^\s*auth:\s*\Q'"$type"'\E\s+\Q'"$key"'\E(\s|$)' /opt/autopeer/dn42-registry/data/mntner/ | perl -ne 's@^.*/@@; s@-MNT$@@; print lc;' | head -1)"; then perl -ne 'print if s@^\s*auth:\s*ssh-@restrict,pty ssh-@'