Browse Source

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

pull/4/head
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
SUPPORTED_KEY_TYPE=(ssh-rsa ssh-ed25519)
Section Checking access
while read-0 key; do
prefix="${key%% *}"
if [ "$prefix" != "ssh-rsa" ]; then
if ! [[ " ${SUPPORTED_KEY_TYPE[*]} " == *" $prefix "* ]]; then
err "Unsupported key:"$'\n'"$key"
echo " Please use only key of the following type:" >&2
printf " - %s\n" "${SUPPORTED_KEY_TYPE[@]}" >&2
return 1
fi
label="${key##* }"

Loading…
Cancel
Save