All Collections
Step by Step Tutorials
EOS Account Creation
How to add your ledger to an existing EOS Account
How to add your ledger to an existing EOS Account

Way to secure your EOS account with the Ledger key

Dario Cesaro avatar
Written by Dario Cesaro
Updated over a week ago

This tutorial will guide you through the process of how to change the permission on your existing EOS account using the Ledger wallet key and Anchor Wallet. If you don’t have an EOS account already, you’ll need to create one first before this guide is applicable to you - however, one thing to note is that if you use a service that asks what you’d like your public keys to be, you can use the public key of your Ledger during creation to start with a Ledger controlled account.

Prerequisites:

To begin with this process you first need to start the Anchor Wallet app and enable the Ledger service (1). From the main menu select the Tools and then Ledger. You’ll be greeted with this screen.

The Ledger here shows that it’s connected as well as displays a number of pieces of information about how the Ledger and Anchor are connected.

Load the Private Key of your account into Anchor

The blue button (1) towards the bottom lets you Load Public Key, which asks the Ledger device for the public key at a particular index. You can (and probably should) leave the index at 0, which essentially means “load the first public key” (you can freely select any other number, each has its own public key). Hit the button, and you’ll be given a Public Key. It will appear right below this load button (2).

The public key looks like this:

EOS89FhLjHmp6eT29ysJxfh6mQBsLbmsZMjs......

Important: Copy this public key to a text file or someplace you can access it again, you’ll need it in later steps.

Load the Private Key of your account into Anchor

If you haven’t already, you’ll need to load the account you’d like to convert to the Ledger keys into Anchor. If you have your keys already loaded in Anchor, you can likely skip this step. One thing to note however is that there are 2 keys for each permission (account), the Owner and the Active Keys. If you want to change both of these keys to the Ledger you’ll need to ensure you either have the Owner key loaded, or both the Owner and Active keys (if they are different).

Importing an account can be done through the Manage Wallets interface. You want to:

  • Import Existing Account

  • Import via Private Key

  • Enter the Private Key

  • Select the account(s) to import

Now that you imported the account you’d like to convert, select it using the account dropdown.

Change the Permissions of your account to use the Public Key of the Ledger

With the account, you’d like to modify selected, go back into Tools and look for the Security -> Permissions section. This area lets you change which keys control your account, and we’ll be using it to update those keys to match that of the Ledger. Make sure you have the correct Public Key (Ledger public key).

If you are changing both the Owner and Active Keys for the account, we recommend you change the Active Key first. By changing the Active Key first, your Owner Key will remain as-is, so if something goes wrong while changing the Active Key you’ll be able to recover your account with the Owner Key.

To change the Active Key, click the purple Modify button on the Active Permission. A popup will appear that asks you for the new Public Key to use for this permission.

Enter the ledger Public Key, ensure it is correct, and submit the transaction. If this transaction is successful, the loaded account will now be controlled by the Ledger and its keys.

Important: You can repeat this same process for the Owner Key - but first make sure the Active key is set up properly and perform at least a test transaction first to ensure everything is set up properly.

You can verify your account keys have been updated by visiting a block explorer like bloks.io or EOSAuthority.com and searching for your account name. Look at the “Keys” section of the block explorer and check if they match. One thing to note is that some explorers show the PUB_ format of keys instead of EOS, and if you click the icon next to the key it should swap between them. These two formats are compatible with each other - don’t let that throw you off.

Once you see your keys are updated successfully, you can move to the next step and set up Anchor to use the Ledger + New Permission.

Remove and re-import your account in Anchor

As of writing this, Anchor does not automatically have a feature that switches from using a private key to using a Ledger for an already imported account. So, you’ll need to remove the account and then set it up again using the Ledger process.

To do this, go into the Manage Accounts section of Anchor. You want to find the account/permission you just changed, and then use the dropdown on the right side of the account to remove the account. After the account is removed, you need to select the import feature to import it, except this time instead of using a private key you’ll use the Ledger option:

  • Click Import Existing Account

  • Click the Load from Ledger option

  • This will find accounts associated with your ledger, select it (1), and then import (2). In case you have selected the index different than 0 (when creating the public key from the ledger, then you need to select the Ledger settings options (near the accounts) and you need to specify the index number you have used in step 1.).

You should now have your account loaded and this time it’ll use the Ledger. Any time you want to use this account, you’ll need your Ledger device connected with Anchor and all transactions will require approval from the Ledger device.

Perform a test transaction, try sending a small amount or voting for block producers, and see if it all works.


Author: Peter Valenčič

Editor: Markus Hinrichs

Translator:

Sources & References:

Did this answer your question?