From 8c235aff0108e9fdaf7df2fccf55c2f3cdf6e44a Mon Sep 17 00:00:00 2001 From: steering7253 Date: Fri, 15 May 2026 18:29:30 -0600 Subject: fix pubkeys with comments --- authorized_keys.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorized_keys.sh b/authorized_keys.sh index 6544416..fc89b9f 100755 --- a/authorized_keys.sh +++ b/authorized_keys.sh @@ -11,7 +11,7 @@ if [ "$1" = "new" ]; then key="$3" connection="$4" - if user="$(grep -l -s -r -P '^\s*auth:\s*\Q'"$type"'\E\s+\Q'"$key"'\E$' /opt/autopeer/dn42-registry/data/mntner/ | perl -ne 's@^.*/@@; s@-MNT$@@; print lc;' | head -1)"; then + 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-@'