Skip to main content

is there a one liner - terminal ssh command to get the expiration date of your hostname SSL Certificate?

Comments

6 comments

  • kodeslogic
    You can check with below command: # openssl s_client -servername your.hostname.com -connect your.hostname.com:443 | openssl x509 -noout -dates
    Replace your.hostname.com in the above command with the server name you wish to check. The output will show dates and other information: [QUOTE]depth=3 C = GB, ST = Greater Manchester, L = Salford, O = Comodo CA Limited, CN = AAA Certificate Services verify return:1 depth=2 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Certification Authority verify return:1 depth=1 C = US, ST = TX, L = Houston, O = "cPanel, Inc.", CN = "cPanel, Inc. Certification Authority" verify return:1 depth=0 CN = your.hostname.com verify return:1 notBefore=Feb 26 00:00:00 2022 GMT notAfter=May 27 23:59:59 2022 GMT
    0
  • Spirogg
    openssl s_client -servername your.hostname.com -connect your.hostname.com:443 | openssl x509 -noout -dates

    this did the trick, I search on google late last night and found something similar but it gave me errors but this CLI works perfect :) thanks @kodeslogic much appreciated :) @cPRex this would be nice if we had the expiration date in another column and RSA as well
    • when we go to Home /SSL/TLS /SSL Storage Manager
    Have add another column for expiration and add the RSA in the first column like the self sign certificates show
    0
  • cPRex Jurassic Moderator
    I like it - you want to put in a feature request and I'll get it reviewed?
    0
  • Spirogg
    I like it - you want to put in a feature request and I'll get it reviewed?

    @cPRex ok I expanded on the Idea a little which would make sense ? here is the Feature Request Hopefully
    0
  • cPRex Jurassic Moderator
    It's been approved!
    0
  • Spirogg
    It's been approved!

    Thanks and Have A Relaxing Weekend ;)
    0

Please sign in to leave a comment.