Browse Source

new: [0km] make ``vps-setup`` support ``ed25519`` ssh keys

journalctl_limit
Valentin Lab 1 year ago
parent
commit
fbe7fa52b8
  1. 5
      bin/0km

5
bin/0km

@ -954,11 +954,14 @@ cmdline.spec::cmd:vps-setup:run() {
fi fi
fi fi
SUPPORTED_KEY_TYPE=(ssh-rsa ssh-ed25519)
Section Checking access Section Checking access
while read-0 key; do while read-0 key; do
prefix="${key%% *}" prefix="${key%% *}"
if [ "$prefix" != "ssh-rsa" ]; then
if ! [[ " ${SUPPORTED_KEY_TYPE[*]} " == *" $prefix "* ]]; then
err "Unsupported key:"$'\n'"$key" err "Unsupported key:"$'\n'"$key"
echo " Please use only key of the following type:" >&2
printf " - %s\n" "${SUPPORTED_KEY_TYPE[@]}" >&2
return 1 return 1
fi fi
label="${key##* }" label="${key##* }"

Loading…
Cancel
Save