coyle, d
coyled.com

SSH keys on a YubiKey in a Mac

Last updated October 05, 2019

You may be the sort of person who needs to SSH into remote machines. And you may also be the sort of person who doesn’t like the idea of SSH private keys laying around on your computer(s). If so, here’s how you can generate a PGP key on a YubiKey plugged into a USB port of a Mac, and then use that key with SSH. This way the private key lives its entire life on the YubiKey and is never placed on a disk in your computer.

Disclaimer

The below instructions use Homebrew for installing software purely to simplify the instructions. Determining whether or not using Homebrew to install software on your computer is compatible with your threat model is left as an exercise for you, dear reader. You can certainly acquire the software via other means if you wish.

Software Stuff

YubiKey Stuff