openssl ecparam -name $CURVE -genkey -noout -out private.ec.key
where $CURVE
is:
prime256v1
for ES256secp384r1
for ES384secp521r1
for ES512
openssl ec -in private.ec.key -pubout -out public.pem#
ssh-keygen -t rsa -b 4096 -E SHA256 -m PEM -P "" -f RS256.key
openssl rsa -in RS256.key -pubout -outform PEM -out RS256.key.pub
*(first line creates openssh format keys, second converts them to RSA)