- Run the following two commands to generate keystore
keytool –genkeypair –alias dlkey -keypass password -storetype jks –keystore dlkeystore.jks -storepass password -validity 365 -keyalg RSA - Export certificate of private key dlkey
keytool –exportcert –alias dlkey -file dlkey.cert -keystore dlkeystore.jks -storepass password - Send the dlkey.cert (public key) to target server.
- Run the following command to import the server certificate (fnet.net.cer) to keystore
keytool –importcert –file fnet.net.cer -alias dlcert -keypass password -keystore dlkeystore.jks –storepass password