[Ethereum] How to import account form geth console to metamask (private blockchain)

consolemetamask

I want to import accounts from geth console(private network) but I can't. I have UTC file when I create account with geth but when I open file and copy mac and paste to metamask (private key) account not match between geth and metamask.

I want to use account from geth to metamask.

Best Answer

You can try:
1. visit the https://www.myetherwallet.com/#view-wallet-info
enter image description here 2. select the "Keystore / JSON File"
3. click the "SELECT WALLET FILE" and select the UTC--2018-09-08T03-31-16xxx-xxx file whic is located in your keystore folder.
4. If there is a "password" in your file, you will see a message "Your wallet is encrypted. Good! Please enter the password."
5. then, click the "Unlock" button
6. You may need to wait more than 10-30 seconds to be redirected to the next page and at the next page, you can get your private key
7. Open your metamask chrome extension
8. Change to the network
9. select "Import Account"
10. You can see a dropdown menu with "Private Key" or "JSON file"
enter image description here 11. Select "Private key"
12. Input your private key and it will create the same account address in metamask