16

Just the opposite of this question How to import a plain private key into geth or Mist? I would like to know how can I obtain the private keys of the accounts created with geth in this way:

$ geth --testnet account new

I've been looking for private key files on ~/.ethereum/keystore but there is only one file for coinbase account. No files for the rest of accounts created.

How can I obtain those missing files? Why are they missing? Thx!

I've already seen How can I import geth accounts into eth? but problem is in my system keystore files don't even exist for most of the geth accounts created, except coinbase.

10

For test net, the folder you are looking for is ~/.ethereum/testnet/keystore/.

  • Thx! Absolutely right. – Juan Ignacio Pérez Sacristán Sep 16 '16 at 12:22
  • 1
    in case you will use windows check %AppData%\Roaming\Ethereum\testnet\keystore – Badr Bellaj Sep 16 '16 at 21:39
  • 3
    On Mac, it's ~/Library/Ethereum/testnet – Travis Reeder Jul 24 '17 at 4:57
  • 2
    this answer is incorrect. JSON account file is not the private key. Private key is a 64 byte sequence encoded in HEX.To get this key you have to decrypt the JSON file first. – Nulik Oct 10 '18 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.