Skip to content

Instantly share code, notes, and snippets.

@mattangi
mattangi / yubikey4-ssh-macos.md
Created October 15, 2023 13:39 — forked from ixdy/yubikey4-ssh-macos.md
Setting up ssh public key authentication on macOS using a YubiKey 4

Setting up ssh public key authentication on macOS using a YubiKey 4

I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:

Basic setup notes

  1. I used a YubiKey 4, while the blog describes using a YubiKey NEO. I'm sure a YubiKey 5 would also work. I'm also running macOS 10.13.6.
  2. I installed GPGTools as recommended. However, as I'll note later, it seems that gpg-agent only automatically starts when gpg is used; for ssh, you'll need to ensure it's running.
  3. Before generating your keys, decide what key size you want to use. If you run the list command inside gpg --edit-card, look for the Key attributes line to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:
Key attributes ...: rsa2048 rsa2048 rsa2048
@mattangi
mattangi / keybase.md
Created September 8, 2019 08:39
keybase verification

Keybase proof

I hereby claim:

  • I am mattangi on github.
  • I am mattangi (https://keybase.io/mattangi) on keybase.
  • I have a public key ASA6t4NRTH_K4kL8RByiyAweS-HJmFQmTrVIaUqugcGUcwo

To claim this, I am signing this object: