Skip to content

Instantly share code, notes, and snippets.

View whorvath2's full-sized avatar

Bill Horvath II whorvath2

View GitHub Profile
@Hakky54
Hakky54 / java_keytool_cheat_sheet.md
Last active November 3, 2026 03:49
Keytool Cheat Sheet

Keytool CheatSheet ๐Ÿ”

Some history

This cheat sheet came into life when I started working on a tutorial of setting up one way tls and two way tls, which can be found here: GitHub - Mutual TLS SSL

Creation and importing

Generate a Java keystore and key pair

keytool -genkeypair -keyalg RSA -keysize 2048 -keystore keystore.jks -alias server -validity 3650