From 2b1e9515c104cb355e06ab2ad0d1c7be5796f302 Mon Sep 17 00:00:00 2001 From: Eclypsed Date: Tue, 16 Dec 2025 19:35:53 +0000 Subject: [PATCH] Update SSH + Yubikey Usage --- SSH-%2B-Yubikey-Usage.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/SSH-%2B-Yubikey-Usage.md b/SSH-%2B-Yubikey-Usage.md index cd30b68..72d0eb3 100644 --- a/SSH-%2B-Yubikey-Usage.md +++ b/SSH-%2B-Yubikey-Usage.md @@ -3,4 +3,16 @@ I use a Yubikey to store my ssh keys as a physical hardware key. ## Retrieving the key to a new machine 1. Plug in the yubikey and make sure yubikey manager is installed (temporarily install it with `nix-shell -p yubikey-manager`) -2. Run `ssh-keygen -K` to generate the `id_ed25519_sk_rk.pub` and `id_ed25519_sk_rk` files in the current directory. \ No newline at end of file +2. Run `ssh-keygen -K` to generate the `id_ed25519_sk_rk.pub` and `id_ed25519_sk_rk` files in the current directory. + +To add the key to the ssh-agent (ephemeral): +```bash +eval "$(ssh-agent -s)" +ssh-add ~/.ssh/id_ed25519_sk_rk # Or whatever the path to the private key is +``` +Or, to permanently add it to the agent, add the following to `~/.ssh/config`: +``` +Host * + AddKeysToAgent yes + IdentityFile ~/.ssh/id_ed25519_sk_rk +``` \ No newline at end of file