How to verify that SSL certificate matches key

In order to verify that OpenSSL key matches certificate you can run following command: For key: openssl rsa -noout -modulus -in yourdomain.key | openssl md5 and for certificate: openssl x509 -noout -modulus -in yourdomain.crt | openssl md5 and for CSR (Certificate Signing Request): openssl req -noout -modulus -in yourdomain.csr <span style="box-sizing: border-box; color: #2aa198;">| openssl md5</span> In all cases you should get the same output, for example: