Is there an easy way to verify that a given private key matches a given public key? I have a few *.puband a few *.key files, and I need to check w
*.pub
*.key
For DSA keys, use
openssl dsa -pubin -in dsa.pub -modulus -noout
to print the public keys, then
openssl dsa -in dsa.key -modulus -noout
to display the public keys corresponding to a private key, then compare them.