Check the expiration date of the certificate

Q. How to check the expiration date of user/host certificate. If it will expire soon , what should I do ?

Ans:

    1. Check the expiration date of the certificate:

$ openssl x509 -in hostcert.pem -noout -enddate

$ openssl x509 -in usercert.pem -noout -enddate

  1. If the certificate is expiring, then follow the procedure to rekey.