stpm-keygen command not found

In this troubleshooting guide we learn how to fix stpm-keygen command not found error message

Introduction

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

stpm-keygen: command not found

or when using sudo you get the following error message

sudo: stpm-keygen: command not found

Solutions to stpm-keygen: command not found

How To Fix stpm-keygen: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu stpm-keygen is provided by simple-tpm-pk11 package.

simple-tpm-pk11 is:

simple-tpm-pk11 provides tools to create a key in your TPM (Trusted Platform Module) chip which can then be used with SSH. The package comes with a library that you can use as “PKCS11Provider” in your SSH configuration file.

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

sudo apt-get -y install simple-tpm-pk11

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

You can also use apt command to install simple-tpm-pk11.

sudo apt -y install simple-tpm-pk11

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

sudo aptitude install simple-tpm-pk11

Summary

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