From af9f34ecbf0862ac94929d89abbad16901c6e6c8 Mon Sep 17 00:00:00 2001 From: Dominik Gleich Date: Fri, 8 Dec 2023 06:50:04 +0100 Subject: [PATCH] Update nixos-infect --- nixos-infect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos-infect b/nixos-infect index f42da0a..6a16c0c 100644 --- a/nixos-infect +++ b/nixos-infect @@ -20,7 +20,7 @@ makeConf() { local IFS=$'\n' for trypath in /root/.ssh/authorized_keys /home/$SUDO_USER/.ssh/authorized_keys $HOME/.ssh/authorized_keys; do [[ -r "$trypath" ]] \ - && keys=$(sed -E 's/^.*?((ssh|ecdsa|sk-ssh|sk-ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \ + && keys=$(sed -E 's/^.* ((sk-ssh|sk-ecdsa|ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \ && [[ ! -z "$keys" ]] \ && break done