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,006
  • 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,511
  • 1
  • 28
  • 34
Bernicc
  • 636
  • 5
  • 14
1

Is this OpenSSL command what you are looking for?

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

Eugene Mayevski 'Callback
  • 44,434
  • 7
  • 64
  • 121