SSH 2FA on MacOS

Im typically one of those people who tries to over prepare in every aspect of my life. Which generally leads me to having a backpack full of things I don’t really need and every once in a while ill have to go through it and take out everything. But recently I had to go into the office under the pretense that I would be leaving back home rather quickly to take care of my dogs. So in my mind I didn’t need to take anything with me and went into the office with nothing. It was surprisingly refreshing to just travel with just the daily basics. During my daily routine I wanted to do some programming and quickly realized that I didn’t have the ability to do so because I left my laptop at home. Which got me thinking of how I could work on these files. At first I thought about getting a usb c flash drive and putting it on my keys but then it would mean I would have to worry about backing up that flashdrive somehow. Then I looked at my keys and saw the already hanging yubikey and wondered if I could secure my server with 2FA. After some initial research it was possible but I couldn’t find any direct tutorials on how set up 2FA for SSH on an Apple device like a Mac Mini. ...

May 31, 2025 · 2 min · 317 words · Me