Java keytool list keystore grep alias and validity
Java keytool list keystore grep alias and validity
Java keytool list keystore grep alias and validity
When you’re managing multiple keystores and need to quickly check if any certs are expired, running keytool -list and piping to grep is much faster than opening each one individually. I run this in monitoring scripts to catch expiring certs before they cause outages.
Watch Explanation on YouTube
How to use grep to find alias and validity of keystore certificate
Link URL : https://youtu.be/SxMri8hvtPw
- Command
1
$ keytool -list -v -keystore /usr/java/jdk1.7.0_65/jre/lib/security/cacerts -storepass changeit | grep "Alias name\|Valid from:"
- Command to list keystore of type p12
1
$ keytool -list -v -keystore custom.p12 -storetype pkcs12 -storepass changeit | grep "Alias name\|Valid from:"
This post is licensed under
CC BY 4.0
by the author.