but this is what I’ve always been after. With this solution
the SSH key cannot be stolen. If someone uses this SSH key that
means that the machine with the TPM chip is involved right now. Right
now it's not turned off, or disconnected from the network.

Update

You need to delete /var/lib/opencryptoki/tpm/your-username/*.pem,
because otherwise your keys will be migratable. I’m looking into how
to either never generating these files, or making them unusable by
having the TPM chip reject them. Update to come.

When I run this again on a completely blank system I’ll add more exact
outputs.

3. Initialise the TPM chip

sudo tpm_takeownership

If you’ve already taken ownership, but set an SRK password, then run
sudo tpm_changeownerauth -s -r. Not all tools support
SRK passwords, so you have to remove it, or in other words change it
to the “well known password” that is 20 zero bytes (I’m not making
that up).

If it says Tspi_TPM_TakeOwnership failed then you may have to use
tpm_clear to reset the chip to factory state and try again. This may
involve cold reboots, enabling the TPM chip in the BIOS, and other
joys.

Run:

sudo pkcs11_startup; sudo service opencryptoki restart

4. Add users to TPM groups

Add all users who will be using the TPM chip to the ‘tss’ and ‘pkcs11’ groups.
Don’t forget to log out and in again, or run su $(whoami).

5. As every user, initialize the user’s TPM PKCS#11 data store</h1>

$ tpmtoken_init

If you get Bus Error (core dumped) then check for, and delete, any
/var/lib/opencryptoki/tpm/your-user-name-here/.stmapfile file laying
around.