Import Private Key to "geth" Account

This section describes how to import a private key from MetaMask wallet to a 'geth' account.

With the private key exported from my MetaMask wallet, I want to import it my "geth" account before I destroy MetaMask wallet.

1. Insert the memory stick that has the private key file.

2. Run "geth account import" command in a command window:

C:\> \herong\bin\geth --datadir \herong\Ethereum\personal 
   account import "E:\MetaMask Herong's Wallet Private Key"
Your new account is locked with a password. Please give a password. 
Do not forget this password.
Passphrase: ******
Repeat passphrase: ******
Address: {ef6ea9f8bd78ac42fb2617ba90846d5785bb320c}

Good. The MetaMask account is restored on the "geth" node now. The account address (the public key) is calculated correctly.

3. Check Account balance on "geth" console:

> eth.accounts

> third = eth.accounts[2]

> eth.getBalance(third)

> web3.fromWei(eth.getBalance(third),"ether")

Excellent. The balance is correct too. That is expected, because the balance is always calculated from transactions stored in the network blockchain.

Table of Contents

 About This Book

 Introduction of Ethereum

 Ethereum Blockchain

 Ethereum Mist Wallet

 geth - Go Ethereum

 Testnet - Ropsten network

 Private Ethereum Network

 64-Bit "geth" for Private Ethereum Network

 Private Network with Custom Genesis Block

 Transferring Funds between Ether Accounts

MetaMask - Browser Based Ethereum Wallet

 What Is MetaMask

 Install MetaMask Extension for Chrome

 Setup MetaMask Extension for Chrome

 View Ethereum Account Address in MetaMask

 Add "Ropsten Test Network" in MetaMask

 Get Free Ether from

 Get Free Ether from

 Get Free Ether from

 Connect MetaMask to Local "geth" Node

 Transfer Ether Fund to MetaMask Account

 Send Ether from MetaMask to Private Network Failed

 Private Network ID Must Match "chainId"

 Send Ether from MetaMask to Private Network

 Process MetaMask Transfer Transaction

 Download and Read MetaMask State Logs

 View Account QR Code in MetaMask

 Export Private Key and Retire MetaMask

Import Private Key to "geth" Account

 Managing Ethereum Account

 Mining Ether with Your Computer

 Archived Tutorials


 Full Version in PDF/EPUB