[Ethereum] Generate keystore file from raw private key (using geth)

keystoremyetherwalletprivate-key

I have my public & private key (generated with MyEtherWallet), however, I forgot to create a keystore file, which would make my online access to the wallet a bit safer if I'm correct.

I got to install geth.exe on my offline computer, and

geth account import e:\rawprivatekey.txt

works, but only returns the public address. I can't seem to get it to regenerate a keystore file! Does anyone know how to do that?

Best Answer

When you import a key in geth it automatically creates a json wallet.

You can list existing wallets with geth account list.

A list should be like this:

Account #3: {59cc3d2701a69e2f006a47e412092d1274f81d58} keystore:///home/ubuntu/.ethereum/keystore/UTC--2018-01-28T05-19-52.363512148Z--59cc3d2701a69e2f006a47e412092d1274f81d58

The file pointed by the keystore is your json wallet you can copy and rename to some other place.