ajaygupta
Posts: 1
Joined: Mon Nov 26, 2012 1:39 pm

java keytool not working

Wed Nov 28, 2012 1:10 pm

Hi,
I am using Raspberry Pi (Debian 3.1.9+ armv6l linux) and javaSE 7 and I am trying to change my trustore password by keytool,
but keytool command is not working, So can you please advice me how can i change my trustore password in this environment

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: java keytool not working

Wed Nov 28, 2012 1:46 pm

It is supposed to work.
ajaygupta wrote:Hi,
I am using Raspberry Pi (Debian 3.1.9+ armv6l linux) and javaSE 7 and I am trying to change my trustore password by keytool,
but keytool command is not working, So can you please advice me how can i change my trustore password in this environment
#Fist install OpenJDK 7 to get a JavaSE 7 compatible keytool on your system.
sudo apt-get update
sudo apt-get install openjdk-7-jdk

# you can now use keytool to create the .keystore
# this can take a lot of time to generate on the raspberry pi because the *low* amount
# of high entropy random data generated by the raspberry pi linux kernel.
keytool -genkey -keyalg rsa -alias tstkey

# you can check the /proc/sys/kernel/random/entropy_avail file to print the amount of avail
# run: cat /proc/sys/kernel/random/entropy_avail
# the generation of new cryptographic keys require some thousands of available bytes

# And finally to change the keystore password run
keytool -storepasswd
Enter keystore password:
New keystore password:
Re-enter new keystore password:
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

Return to “Beginners”