Congratulations, you have a U2F YubiKey! So how do you set it up to protect your Google accounts? Follow these easy instructions and you’ll be protected with the simplicity of YubiKey two-factor authentication in no time!

If you do not have a U2F YubiKey, you can still use your YubiKey Standard or YubiKey Edge to protect your Gmail account. See our instructions here to learn how to use authenticator codes to protect your account.


  • Latest version of Google Chrome browser (or at least version 38)
  • A U2F Security Key, YubiKey 4, YubiKey 4 Nano, YubiKey 4C, YubiKey NEO, or other Yubico U2F-enabled YubiKey
  • One finger (the YubiKey button is a capacitive sensor, not a biometric)
  • A Google Account (such as Gmail, Google Docs, YouTube, Google Plus, Blogger, Adwords)

Note: If your Google account is a managed account — such as with G Suite, Google Cloud, or Google for Education — your administrator must have enabled two-step verification before you can use your YubiKey. If the option to select 2-Step Verification is not available (as described in the steps below), ask your administrator to enable this security option.

Setting Up Your Google Account

  1. Set up 2-Step Verification for your Google account, if you have not yet done so. This is also where you will set up your mobile device as a back up. (If you already have set up 2-Step Verification, continue step 8.) To set up 2-Step Verification, in your Chrome browser, click My Account, then click Sign-in & Security.
  2. In the section under Password & sign-in method, click 2-Step Verification. You may be prompted to sign in to your Google account again.
  3. Select Start Setup, to begin setting up 2-step verification.
  4. If it is not already selected, click Verification Codes.
  5. Under Backup Options, click Add a phone number. This is an important step should you ever need access to your account and find yourself without your YubiKey. We also recommend that you have a second YubiKey for backup so that you can always access your accounts – similar to how you have an extra copy of your keys for your house or your car.
  6. In the Add backup phone number dialog box, enter your phone number and specify how you want to receive codes (usually by SMS text message).
    • If you want to verify that your backup method works, click Send Code.
    • Click Save.
  7. (Optional) You also have backup codes that you can use to gain access to your account. This is an additional mechanism to use if you do not have access to your YubiKey or your phone. You might find it useful to copy these backup codes and put them in a safe place. To do this, click Show backup codes. A new browser window is opened so you can manage your backup codes.
    • Click Print or Save to text file, to save your codes.
    • In the future, if you notice you have used a few of your backup codes and you are worried about running out of them, you can return to this screen and click Generate new codes.
  8. Now you are ready to register your YubiKey as your 2-Step Verification device. Click Add Security Key, and then click Next.
  9. Click Next a second time, and then insert your YubiKey into the USB port of your computer. Wait for the YubiKey to blink, tap the YubiKey button, and that’s it! Click Done.
    Your YubiKey is now registered to your account as your default Two-Step Verification device!
  10. The screen now displays all devices that are registered to your account, so you can easily add another Security Key, or remove registered keys. (If you accidentally lose a YubiKey, come here and remove that YubiKey from your account. No one could log on to your account, though, because they would still need to know your password.)

Logging in to Your Google Account

Logging in to your Google account with your YubiKey is refreshingly simple.

  1. The next time you need to login to your Google account, enter your user name and password, and click Sign in.
  2. When prompted for 2-Step Verification, insert your YubiKey, wait for it to blink, and then tap it.
    • If you want to trust this computer for a short period of time, so you do not have to insert your YubiKey each time you log in, check the box to Remember this computer for 30 days.
    • If you do not have your YubiKey with you, click Use a verification code instead. You can then use either an SMS text message with a backup code, or one of the eight backup codes you previously saved.
      Gmail: Sign In with 2-Step Verification

Congratulations! Your Google account is now secure with Yubico two-factor authentication!

No U2F-Enabled YubiKeys?

Here is a one-time password solution for Gmail that works with YubiKeys that do not currently support U2F. It relies on a free application called the Yubico Authenticator (that works on the Windows, Mac, or Linux operating systems) to generate time-based authentication codes.

Running Microsoft Internet Explorer or Mozilla Firefox?

Mozilla is currently building support for U2F and Microsoft is working within the FIDO Alliance to bring support to Windows 10. But for now, you can use Yubico Authenticator, described above, for YubiKey two-factor authentication if your browser isn’t Google Chrome.

in How To