mirror of
https://github.com/bin456789/reinstall.git
synced 2025-09-09 10:01:46 +00:00
fix(reinstall.sh): 修正SSH密钥验证正则表达式中的ecdsa算法名称 (#334)
This commit is contained in:
@@ -3810,7 +3810,7 @@ EOF
|
|||||||
|
|
||||||
# https://manpages.debian.org/testing/openssh-server/authorized_keys.5.en.html#AUTHORIZED_KEYS_FILE_FORMAT
|
# https://manpages.debian.org/testing/openssh-server/authorized_keys.5.en.html#AUTHORIZED_KEYS_FILE_FORMAT
|
||||||
is_valid_ssh_key() {
|
is_valid_ssh_key() {
|
||||||
grep -qE '^(ecdsa-sha-nistp(256|384|512)|ssh-(ed25519|rsa)) ' <<<"$1"
|
grep -qE '^(ecdsa-sha2-nistp(256|384|512)|ssh-(ed25519|rsa)) ' <<<"$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -n "$2" ] || ssh_key_error_and_exit "Need value for $1"
|
[ -n "$2" ] || ssh_key_error_and_exit "Need value for $1"
|
||||||
|
Reference in New Issue
Block a user