key command not found

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

Introduction

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

key: command not found

or when using sudo you get the following error message

sudo: key: command not found

Solutions to key: command not found

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

In Ubuntu key is provided by donkey package.

donkey is:

Donkey is an alternative for S/KEY’s “key” command. This means that donkey is also an alternative for “keyinit”. Since the entry is printed to stdout (not to /etc/skeykeys), you can easily send it to a remote operator by e-mail (with a PGP signature or something). So, it is possible to initiate S/KEY without logging onto the console of the host.

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

sudo apt-get -y install donkey

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

You can also use apt command to install donkey.

sudo apt -y install donkey

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

sudo aptitude install donkey

Summary

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