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

Ateev Chopra
  • 1,026
  • 2
  • 15
  • 32
  • 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 '12 at 20:12

2 Answers2

5
openssl s_client -connect example.com:443

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

John Watts
  • 8,717
  • 1
  • 31
  • 35
Bernicc
  • 636
  • 6
  • 14
1

Is this OpenSSL command what you are looking for?

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

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121