mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-11-01 00:29:57 +03:00
add support for SK authorized keys
nixos-infect incorrectly handles
This commit is contained in:
parent
6a72f0bff6
commit
25d753abc7
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ makeConf() {
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
for trypath in /root/.ssh/authorized_keys /home/$SUDO_USER/.ssh/authorized_keys $HOME/.ssh/authorized_keys; do
|
for trypath in /root/.ssh/authorized_keys /home/$SUDO_USER/.ssh/authorized_keys $HOME/.ssh/authorized_keys; do
|
||||||
[[ -r "$trypath" ]] \
|
[[ -r "$trypath" ]] \
|
||||||
&& keys=$(sed -E 's/^.*((ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \
|
&& keys=$(sed -E 's/^.*?((ssh|ecdsa|sk-ssh|sk-ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \
|
||||||
&& [[ ! -z "$keys" ]] \
|
&& [[ ! -z "$keys" ]] \
|
||||||
&& break
|
&& break
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue