Foxboron / ssh-tpm-agent

:computer: :key: ssh-agent for TPMs
MIT License
354 stars 20 forks source link

[0.3.0-1] TPM key is in an old format. Will not load it. #48

Closed knightshrub closed 8 months ago

knightshrub commented 8 months ago

Since upgrading to version 0.3.0-1 from the archlinux repo, ssh-tpm-agent complains about the key being in an old format:

[2024-03-06T17:59:11+0100] [ALPM] upgraded ssh-tpm-agent (0.2.0-2 -> 0.3.0-1)
$ journalctl --user -u ssh-tpm-agent
Mar 09 09:18:06 sunny systemd[838]: Started ssh-tpm-agent service.
Mar 09 09:18:06 sunny ssh-tpm-agent[13577]: time=2024-03-09T09:18:06.309+01:00 level=INFO msg="Activated agent by socket"
Mar 09 09:18:06 sunny ssh-tpm-agent[13577]: time=2024-03-09T09:18:06.312+01:00 level=INFO msg="TPM key is in an old format. Will not load it." key_path=/home/knightshrub/.ssh/id_ecdsa.tpm error="old format on key"

The release notes for 0.3.0 mention this breaking change. Is there a way to upgrade the key format or do I have to generate a new key?

Foxboron commented 8 months ago

There isn't any way to migrate the key format as they are not compatible TPM keys.

knightshrub commented 8 months ago

Thanks for letting me know, I regenerated the keys and its working fine now!