This is such a basic question, but I can not figure out how to import a plain, unencrypted private key into geth or mist?
geth account import 7[......]bla but it seems this command is always looking for an unencrypted keyfile.
Paste the key into a text file, save it to disk and use the path to that file with
geth account import. Here are some example Windows instructions that might help:
geth account import C:\nothing_special_delete_me.txt
If you do not have geth installed already, do the following steps after step 3, and the continue to step 4:
cd c:\Ethereum-Wallet-win64-0-7-3\resources\node\geth(insert your correct path there)
Mist has no way to import via GUI, so you need to import using command line (
geth). It will show up in your Mist immediately.
Paste key into TextEdit without any extra characters or quotations
Save the file as
nothing_special_delete_me.txt to your Desktop
Open Terminal, run command:
geth account import ~/Desktop/nothing_special_delete_me.txt
After successful import, delete the file from your desktop.
Noting the popularity of this question I went ahead and built a tool such that if you have your raw private key, you can easily convert it into its public key counterpart and the derived Ethereum address.
You can then export the key in the appropriate format as defined here such that it can be utilised with Geth or Parity.
That said, I think it is worth noting that you should not be working with your private key directly anyway. Your private key controls access to your account.
Only use this method for throw-away, testing accounts since your key will be stored in your shell's history (thanks to @tayvano).
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca is your private key:
geth account import <(echo abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca)