export public key from certificate code example
Example 1: create public key from private
chmod 400 ~/.ssh/id_rsa
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
Example 2: get public key from certificate
openssl x509 -inform der -in certificate.der -pubkey -noout > public_key.pem