Copy ecdsa/sk keys from /root/.ssh/authorized_keys

This commit is contained in:
Gary Guo 2023-11-08 16:13:10 +00:00 committed by GitHub
parent fca6d15d05
commit 7d89d7c99f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ extractPubKeys() {
key="$home/$file"
if test -e "$key"; then
# workaround for debian shenanigans
grep -o '\(ssh-[^ ]* .*\)' "$key" >> ssh/authorized_keys || true
grep -o '\(\(ssh\|ecdsa\|sk\)-[^ ]* .*\)' "$key" >> ssh/authorized_keys || true
fi
done
}