oddlama / agenix-rekey

An agenix extension adding secret generation and automatic rekeying using a YubiKey or master-identity
MIT License
197 stars 16 forks source link

Error: identity file contains non-identity data on line 1 #29

Closed ztr-pen closed 3 months ago

ztr-pen commented 3 months ago

Hi - I am trying to wrap my head around the project.

I obtained my public key from my yubikey with ssh-keygen -t ed25519-sk -O resident -O application=ssh:998 -O verify-required and refer to my public key location in the configuration.nix.

Both public key and private key are saved at ~/.ssh/

I then obtained my host key using ssh-keyscan hostname

I have tried to save the secret file in multiple locations referred to in my configuration.nix.

I am running the flake via nix shell github:oddlama/agenix-rekey

Agenix enters nano editor but when I try and save the file Age is returning the following error no mater the location i try and save the secret file:

Error: identity file contains non-identity data on line 1

Where am i missing a step?

oddlama commented 3 months ago

You need to use an age identity, not an opemssh identity. See the README of age-plugin-yubikey for information on how to create such a key.