To see if the private key matches the certificate, use the following two commands and compare the Modulus section:
`openssl x509 -in file.crt -noout -text`
`openssl rsa -in file.key -noout -text`
If they match, the private key matches the certificate.
Alternative way is to use `openssl md5`
- Certificate: `openssl x509 -in file.crt -noout -modulus | openssl md5`
- Private Key: `openssl rsa -in file.key -noout -modulus | openssl md5`