allow colons in ssh key comments and adjust ssh key whitespace handling

This commit is contained in:
2021-05-12 11:48:55 -05:00
parent 46a691b876
commit 71db4b3333
3 changed files with 7 additions and 7 deletions

View File

@ -32,8 +32,8 @@ if echo "$memory" | grep -vqE "^[0-9]+$"; then
fi
echo "$pubkeys" | while IFS= read -r line; do
if echo "$line" | grep -vqE "^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$"; then
echo "pubkey \"$line\" must match "'"^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$"'
if echo "$line" | grep -vqE '^(ssh|ecdsa)-[0-9A-Za-z+/_=@:. -]+$'; then
echo "pubkey \"$line\" must match \"^(ssh|ecdsa)-[0-9A-Za-z+/_=@:. -]+$\""
exit 1
fi
done