What is a YubiKey and how does it work? | Zapier (2024)

When I got my first YubiKey, I plugged it into my laptop, tried setting it up with a few accounts, then gave up. For a year and a half. It doesn't matter how computer-literate you are, or how much you value security—something about the YubiKey just feels confusing. But it doesn't have to.

The YubiKey is a device that makes two-factor authentication as simple as possible. Instead of a code being texted to you, or generated by an app on your phone, you press a button on your YubiKey. That's it. Each device has a unique code built on to it, which is used to generate codes that help confirm your identity. Press the button and you can log in.

We could get into the math, and break down the various protocols supported by devices like this, but most users don't need to know any more than "enter your username and password, as usual, then press the button on the YubiKey to log in."

A YubiKey is required to access many of Zapier's internal tools, so I've finally gotten around to learning how to use one. I'm glad I did—here's why, and how you can set one up too.

YubiKey isn't the only hardware two-factor authentication device on the market—just the most popular. There are a number of similar devices out there, and most of the information outlined in this article applies to them.

What is two-factor authentication?

We've written extensively about two-factor authentication, but it's necessary to go over the basics before we can explain why hardware two-factor authentication devices are a good idea.

Passwords are terrible. Most are too easy for hackers to guess, and the rest are too long or complicated for humans to remember. Even secure passwords are useless once they've been leaked, and leaks are basically inevitable. For these reasons, and more, it's a good idea not to rely entirely on passwords. That's the entire idea behind two-factor authentication (often shortened to 2FA).

With two-factor authentication, you need two things to sign in: your password, yes, but also something else that proves you are who you say you are. You're probably familiar with two ways of doing 2FA:

  • SMS or email codes. Apps send you a code, which you need to enter before you can log in. This is the easiest method to set up because you don't need to install any software or purchase any hardware. It's also the least secure because email and SMS are both unencrypted and easily compromised.

  • Authentication apps. Apps you want to log in to will ask you for a code that you can retrieve by opening an app on your phone, like Google Authenticator or Authy. This is far more secure than relying on SMS or email, but it's not exactly convenient—you need to grab your phone, open an app, then type out a code.

The YubiKey represents a third way of doing two-factor authentication: hardware authentication. Apps ask you to plug a tool like a YubiKey into your device and press a button. The YubiKey sends a unique code that the service can use to confirm your identity. This is more secure, because the codes are much longer, and more convenient, because you don't have to type out the codes yourself.

There's a lot more nuance than this, of course. But for the most part, you just need to know that it's 2FA that's more secure and easier to use.

Why is a YubiKey better than other 2FA?

We've gone over this a little, but let's talk about why a YubiKey (and similar devices) is better than other forms of 2FA. To name a few:

  • Convenience. SMS, email, and authentication apps all require that you copy and paste, or manually enter, a code. With the YubiKey, you just press a button on a device attached to your computer.

  • Much longer codes. Other 2FA methods typically only send you a six-digit code to confirm your identity, basically because it would be unreasonable to expect humans to type much more than that. YubiKeys don't ask you to manually type a code, so they're free to use much longer codes. That's more secure.

  • Easy to migrate. Did you get a new computer? Just unplug your YubiKey from the old one, plug it into the new one, and you can log in to all of your apps, same as before. You can also use one key to log in to your account on multiple computers. I've found the process to be much easier than migrating other 2FA.

  • Really hard to hack. It's relatively easy for hackers to compromise your email or SMS. It's a lot harder—close to impossible with current technology—to fake the codes generated by a unique hardware device.

Again, there's a lot more nuance here, but these are the broad advantages of the YubiKey over other forms of 2FA.

How to set up your YubiKey

Setting up your YubiKey isn't that different from setting up app-based two-factor authentication. If you're actually using a YubiKey (not another hardware authenticator), here's what you need to do:

  1. Plug in your YubiKey.

  2. Head to Yubico.com/setup and click your device.

  3. Browse the list of supported apps and find what you want to secure.

  4. Follow the instructions.

How this works is going to vary from app to app, but I'll use Google as an example. Follow the instruction for Google, and you'll find a link with instructions for adding your YubiKey to your Google account, which offers a link for adding your key.

What is a YubiKey and how does it work? | Zapier (1)

You will be asked to plug in your device and press the button on it.

Do that. Your browser may ask for permission to access your key, but once you give that permission, you should get a confirmation that your key is set up. You can optionally give it a name, which is useful if you have multiple YubiKeys.

What is a YubiKey and how does it work? | Zapier (3)

That's it. You can now use your YubiKey to log in to your Google account on any device. Repeat this process for every account you want to lock down in this way.

How do I stop accidentally triggering my YubiKey?

What is a YubiKey and how does it work? | Zapier (4)

I own the YubiKey 5C Nano, which is a tiny USB-C dongle. I leave it plugged into my MacBook Pro, and it's surprisingly easy to trigger accidentally—particularly when picking up my laptop. It's not so much a button as it is a thin strip of metal that triggers when touched. When you touch it, it thinks you're trying to log in to something, which results in a secure code being entered in whatever text box you have open, and then the enter key being "pressed." The result, on Slack, looks like this:

What is a YubiKey and how does it work? | Zapier (5)

These codes are generated by OTP, which is one of the protocols that your YubiKey uses to connect to servers. You could stop this from happening altogether by turning off OTP, but that might break your ability to log in to some services. I think, for most users, it's better to configure OTP to not trigger unless you hold the button for three seconds. This is a little complicated, but doable. YubiKey offers instructions for fixing this, but they're kind of hard to follow, so here's a summary.

To get started, download YubiKey manager on your computer. Install it, open the program, hover over Applications and click OTP.

What is a YubiKey and how does it work? | Zapier (6)

You should see two slots for OTP: the Short Touch, in Slot 1, and Long Touch, in Slot 2. Click the Swap button, so that OTP shows up in Slot 2. Like this:

What is a YubiKey and how does it work? | Zapier (7)

In some cases it won't be this simple, but only if you've configured Slot 2 for some other purpose. You can read more on the YubiKey website if that's you.

Is accidentally triggering my YubiKey in a chat room really bad?

If you accidentally paste a code into something like Slack or a text editor, that's not a reason to immediately panic—it's not completely obvious who it belongs to or what it can be used to log in to (and, if you posted it on Slack, hopefully your coworkers aren't trying to hack you).

Having said that, there's always a chance a leaked 2FA code could enable a particularly creative hacker, so you don't want to make a habit out of this.

You're also not helpless if it happens. Every YubiKey code is unique, and becomes invalid every time you use the device to log in to something. You can manually invalidate codes, if you're worried. Just head to this website and paste the leaked code there.

At Zapier people accidentally post YubiKey codes on Slack…a lot. It's an internal meme at this point. It's funny, and probably harmless, but our security team set up an automated system to invalidate all such codes just in case. You can set it up if you want—click here to get started.

Can I use one YubiKey with multiple devices?

Yes! Just plug your YubiKey into any computer and log in the way you normally would. That's really it—you'll be able to log in to all of your accounts, same as before. You can use your YubiKey to log in on as many devices as you want, so long as there's a slot for it. This is nice if you own multiple devices, and also nice when you get a new computer.

What if I lose my YubiKey?

It's not great. Without your YubiKey you probably won't be able to log in. But there are a few things you can do to reduce the risk.

  • Most services that support 2FA (including YubiKey) allow you to create backup codes. Make sure you do this, and that you keep the codes somewhere secure—ideally offline. Consider printing them and putting them in a lockbox, if you can.

  • You could also add some other kind of 2FA to any service you set up with your YubiKey, as a fallback. This could be app-based verification, or you could buy a second YubiKey, add it as an option for all of your services, then store it somewhere safe (a different lockbox than the one your backup codes are in, maybe?).

If you don't have backup codes or a second 2FA method, and have already lost your YubiKey, you're not necessarily out of luck. Most services that offer 2FA have some kind of verification process for logging in after losing your credentials, but be warned: it's going to take a while, and it's going to be a lot of trouble. It's far better to be prepared, so make sure you have backup codes somewhere secure or a second 2FA method set up.

Also: make sure to remove your lost YubiKey as a 2FA method after you regain access to your account. Odds are whoever finds your YubiKey won't know which accounts it provides access to, but better safe than sorry.

To clarify: your Yubikey doesn't store identifiable usernames and does not store any of your passwords. Anyone who finds your YubiKey would have absolutely no way of knowing which accounts it can log in to. This changes a little if the person who "finds" it knows it's yours—say because they stole it from your house or office. But anyone who finds a YubiKey on the street, or in an airport, won't be able to figure out whose key it is.

The YubiKey seems intimidating, but it doesn't have to be. Set up your apps to use it, and you'll find that it's actually easier than other forms of two-factor authentication. Take it from someone who put it off for a long time—it's worth it.

Photo by Andre A. Xavier on Unsplash.

What is a YubiKey and how does it work? | Zapier (2024)

FAQs

What is a YubiKey and how does it work? ›

YubiKey is a security token that allows users to add a second authentication factor to online services from tier 1 vendor partners, including Google, Amazon, Microsoft and Salesforce. YubiKey, which stands for ubiquitous key, looks similar to a USB thumb drive.

What is YubiKey for dummies? ›

The YubiKey is a device that makes two-factor authentication as simple as possible. Instead of a code being texted to you, or generated by an app on your phone, you press a button on your YubiKey. That's it. Each device has a unique code built on to it, which is used to generate codes that help confirm your identity.

What is the use of Yubico key? ›

The YubiKey enables smart card authentication

The YubiKey allows three different protocols to be used simultaneously – PIV, as defined by the NIST standard for authentication; OpenPGP for encryption, decryption, and signing; and OATH, for client apps like Yubico Authenticator.

Can I leave my YubiKey plugged in all the time? ›

Do I need to keep my yubikey plugged in all the time? A. No, you only need to insert your yubikey when you are prompted to do so during login. Leaving it plugged in could result in the yubikey being lost or damaged.

Why do you have to touch YubiKey? ›

The YubiKey has an integrated touch-contact that triggers the OTP generation. Generated OTPs are sent as keystrokes by the emulated keyboard, thereby allowing the OTPs to be received by any text input field or command prompt.

Can you use a YubiKey with a cell phone? ›

Direct Connect (USB-C or Lightning) - Using a YubiKey 5C or YubiKey 5Ci plugged in directly to a mobile device to authenticate. Using a direct connection, the YubiKey can be used in the same manners as with a desktop or laptop, including support for a user touch to verify an authentication event.

Can YubiKey replace passwords? ›

FIDO2 offers expanded authentication options including strong single factor (passwordless), two factor, and multi-factor authentication. With these new capabilities, the YubiKey enables the replacement of weak username/password credentials with strong hardware-backed cryptographic key pair credentials.

Do you have to touch YubiKey? ›

Touch is not a part of the PIV standard. That is why the first YubiKeys that supported PIV did not have the option of touch when using a PIV key. This non-standard ability to require touch was added to YubiKey in version 4 to augment security.

How many times can a YubiKey be used? ›

A Yubikey can be used for an unlimited number of accounts if you're using WebAuthn. You also have an unlimited number of accounts for U2F. If you're using your Yubikey for TOTP, you can only hold 32 accounts.

Do any banks use YubiKey? ›

Many Bank of America online banking users that have a YubiKey, can now register their security key for account sign-in two-factor authentication (2FA) as well as setting up the Secured Transfer feature to add an extra layer of physical security to their online account.

What kind of device is a YubiKey? ›

The YubiKey is a hardware authentication device manufactured by Yubico to protect access to computers, networks, and online services that supports one-time passwords (OTP), public-key cryptography, and authentication, and the Universal 2nd Factor (U2F) and FIDO2 protocols developed by the FIDO Alliance.

How long does a YubiKey last? ›

How long does a YubiKey last? The internals of the YubiKey's security algorithms currently limits each key to 30+ years of usage. The Yubikey is powered by the USB port and therefore requires no battery and there is no display on it that can break. The key itself will survive years of daily use.

How many passwords can YubiKey hold? ›

OATH (Yubico Authenticator) - the YubiKey 5's OATH application can hold up to 32 OATH-TOTP credentials (AKA authenticator app codes).

Where should I put my YubiKey? ›

Place your YubiKey into your USB port. Once plugged in, the key should show you a blinking light. If it's not blinking, try plugging it into a different USB port, or flip it around—you may have inserted it upside-down. Once you see the blinking light, press the gold disk in the middle of the key.

What happens if someone steals your YubiKey? ›

If you lose your Yubikey, you can still use your phone authenticator app, but you cannot create a backup Yubikey. However, Yubikey also provides methods to recover your account, so you can get a replacement. An advantage to Yubikey is that it comes on a USB that cannot be identified.

Can 2 people use the same YubiKey? ›

You can use the single Yubikey for multiple accounts if it's configured using WebAuthn/FIDO2. Let me know if this helps!

Can YubiKey be tracked? ›

YubiKeys can be easily numbered, tracked, and managed as a state asset. If a user leaves the organization, the YubiKey can be quickly and securely reassigned to another user.

Can someone hack a YubiKey? ›

> A Yubikey can be hacked to send arbitrary keystrokes - but that's of limited usefulness.

Can YubiKey work without Internet? ›

Unlike SMS codes and mobile push authentication, YubiKeys do not require a cellular connection to operate. In fact, they don't even require batteries or have any other external dependency. Simply plug the key into a USB port on your device and touch to authenticate.

Does YubiKey connect to Internet? ›

Accessing WiFi with a Yubikey

After setup is complete, open your Network and Internet Settings menu and locate the SSID that you previously configured to authenticate with certificates. Select it and click Connect.

Can a magnet damage a YubiKey? ›

Hi! Sorry for late reply. Static magnetic fields from permanent magnets does not affect the Yubikey.

Can I store the passwords on my YubiKey? ›

Using the YubiKey Personalization tool a YubiKey can store a user-provided password on the hardware device that never changes.

What happens if my YubiKey stops working? ›

You can test your YubiKey on their demo site, then contact YubiKey if a replacement is needed. Test your YubiKey here https://demo.yubico.com/. If it is failing, then you will need to contact YubiKey directly on a replacement – YubiKey troubleshooting.

Do I need to eject my YubiKey? ›

This YubiKey must be removed if utilizing after the authentication process and kept on your person to ensure utmost security following its activation.

What is the cost of YubiKey? ›

A YubiKey is the ultimate line of defense against having your online accounts taken over. And with prices starting at $25, it's one of those indispensable gadgets for the 21st century.

Is YubiKey a smart card? ›

The YubiKey is well known as a strong two-factor, multi-factor, and passwordless authenticator. Unbeknownst to many, it's also a PIV-compatible Smart Card. All YubiKey 5 Series keys provide smart card functionality based on the PIV interface.

What happens if a YubiKey breaks? ›

> Yubikeys make me nervous, what happens when it breaks? or your house burns down. If using it for on-key generation, presumably with systems that you have at least intermittent physical access to, then breakage merely means doing a manual shuffle of going around and updating certs with a new key.

Can a YubiKey be hacked? ›

> A Yubikey can be hacked to send arbitrary keystrokes - but that's of limited usefulness.

Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 6165

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.