A separate key from the signing one — same process, different application name:
ssh-keygen -t ed25519-sk -O resident -O application=ssh:<your-username>-auth -O user=<your-username> -C "<your-email>" -f "$env:USERPROFILE\.ssh\id_ed25519_sk_<your-username>-auth"Copy the public key:
Get-Content "$env:USERPROFILE\.ssh\id_ed25519_sk_<your-username>-auth.pub"Go to GitHub → Settings → SSH and GPG keys → New SSH key:
- Title:
YubiKey <your-username> auth - Key type: Authentication Key
- Paste the public key
Add to ~\.ssh\config (create the file if it doesn't exist):
Host github.com
IdentityFile ~/.ssh/id_ed25519_sk_<your-username>-auth
IdentitiesOnly yes
Add-Content "$env:USERPROFILE\.ssh\config" "`nHost github.com`n IdentityFile ~/.ssh/id_ed25519_sk_<your-username>-auth`n IdentitiesOnly yes"ssh -T git@github.comExpected response: Hi <your-username>! You've successfully authenticated, but GitHub does not provide shell access.
git remote set-url origin git@github.com:<your-username>/<your-repo>.gitVerify:
git remote -vgit push -u origin mainTouch the YubiKey when prompted.