fix(reinstall.sh): 修正SSH密钥验证正则表达式中的ecdsa算法名称 (#334)
Some checks failed
同步到 CNB / 同步到 CNB (push) Waiting to run
运行主程序 / 运行主程序 (./reinstall.bat --debug --password 123@@@, windows-latest) (push) Has been cancelled
运行主程序 / 运行主程序 (sudo bash reinstall.sh --debug --password 123@@@, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
MrZhiin 2025-05-06 11:03:12 +08:00 committed by GitHub
parent 103ef84f92
commit 89a8efa123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3810,7 +3810,7 @@ EOF
# https://manpages.debian.org/testing/openssh-server/authorized_keys.5.en.html#AUTHORIZED_KEYS_FILE_FORMAT
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"