yubikey command not found

In this troubleshooting guide we learn how to fix yubikey command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

yubikey: command not found

or when using sudo you get the following error message

sudo: yubikey: command not found

Solutions to yubikey: command not found

How To Fix yubikey: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu yubikey is provided by python3-yubiotp package.

python3-yubiotp is:

YubiOTP is a library for verifying YubiKey OTP tokens. It includes both the low-level implementation for verifying tokens locally and clients for multiple versions of the Yubico validation web service. The primary audience is developers who wish to verify YubiKey tokens in their applications, presumably as part of a multi-factor authentication scheme.

For testing and experimenting, the included yubikey script simulates one or more YubiKey devices using a config file. It also includes utility commands such as a modhex converter.

YubiOTP also includes a command-line web service client called yubiclient.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-yubiotp

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-yubiotp.

sudo apt -y install python3-yubiotp

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-yubiotp

Summary

In this tutorial we learn how to fix yubikey command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.