There is an answered question which asks about the specifics and the answers are technical. I am looking for a conceptual answer in a ELI5 manner.

A TPM is a hardware chip which stores critical keys. I.e. instead of keeping your private key as a file in .ssh/id_rsa it is placed within a TPM.

This way the content of the private key is never exposed, neither as a file nor in the RAM of the computer. It would be available in the computer RAM if the ssh was doing the decryption.

Instead, SSH will use the API provided by the TPM and say something like

Hey TPM, can you encrypt/decrypt this data without me ever touching the key?

How does a TPM know that it's ok to provide these encryption/decription services to an application (in this case SSH)?


1 Answer 1


The ELI5 answer: The app (should) only talks to the TPM daemon. The app authenticates itself to the daemon with an authentication key that is paired with a app key stored in the TPM. Once this authentication is performed, the app hands the TPM the encrypted message for the TPM to decrypt.

The app never sees the decryption key and the app is authenticated.

The full answer: every tutorial on how to connect ssh with a TPM.

  • Seems like the "app authentication key" becomes the weakest link in that chain then. How is that it handled? Rephrased: Why aren't we facing the same problem we hoped to solve with the TPM, just with a different key? Aug 31, 2022 at 16:12
  • ... any external process to access the TPM would be the "weakest link". As for your new question, the answer is to look at what the TPM is meant to protect against.
    – schroeder
    Aug 31, 2022 at 16:15
  • From what I gathered, it is meant to solve the problem where the hard disk encryption key lives on that same disk encrypted. I'm trying to get what it solves for the SSH case. Do you have any more directing questions? Perhaps we can try phrasing them in an ELI5 manner and expand your answer? Aug 31, 2022 at 16:23
  • My answer addresses what you've asked. What it appears that you want to know is why someone would want to use the TPM at all for SSH. That's a new question (and easily looked up). I spent less than 5 minutes finding this answer as well as the answer to this new question. Please do some research on your own, and if you have a specific confusion, we can take a look at that new question.
    – schroeder
    Aug 31, 2022 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .