1

Other than using browser,How can I get the public key of a websites which use https protocol ? Are there other ways ? Like from the terminal.

Update - i want all the ways so that i can choose what fits best for me

1
  • You need be more precise. There are multiple dozen ways to get a certificat. From a shell, programmatically, manually or from n clients etc...
    – dertkw
    Jun 19, 2012 at 20:12

2 Answers 2

6
openssl s_client -connect example.com:443

Certificate is between -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----

1
  • where to enter the domain name ? Jun 19, 2012 at 20:32
1

Is this OpenSSL command what you are looking for?

openssl s_client -connect ${REMHOST}:${REMPORT}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.