mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-11-01 00:29:57 +03:00
Update nixos-infect
This commit is contained in:
parent
25d753abc7
commit
af9f34ecbf
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|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" ]] \
|
&& [[ ! -z "$keys" ]] \
|
||||||
&& break
|
&& break
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue