by kadenwolff on 5/30/22, 6:51 AM with 151 comments
by nextlevelwizard on 5/30/22, 7:28 AM
I'm probably just over thinking this and overly paranoid.
by vladvasiliu on 5/30/22, 7:22 AM
Many systems still don't have OpenSSH 8.2 (Windows 11, older debian stable, etc). For those, another solution is to use the PGP applet of the YubiKey, which exposes a regular RSA key.
This guide has worked well for me: https://github.com/drduh/YubiKey-Guide
You can jump to the SSH sections if that's all you're after.
There's a missing piece for Windows, since the agent coming with WinGPG won't be reachable by SSH. Some guy on GitHub put out a workaround, but I can't find it right now.
--
edit: The workaround for Windows is this one: https://github.com/rupor-github/win-gpg-agent
by seodisparate on 5/30/22, 8:36 AM
1. gpg-agent must act as your ssh-agent (which means ssh-agent should be disabled and replaced by gpg-agent).
2. If using `pinentry-curses` (YubiKey usually permits access to the contained GPG key via the use of a pin), you must have `export GPG_TTY=$(tty)` (or your shell's equivalent of setting the GPG_TTY environment value to the output of `tty`).
3. You can fetch the public key of your GPG key with `ssh-add -L` (gpg-agent must be acting as your ssh-agent, and the YubiKey with the GPG key has to be plugged in).
4. You must have the line `enable-ssh-support` in your `$GNUPGHOME/gpg-agent.conf`.
I used a guide[1] to set up a GPG key on to a YubiKey, and for those who don't want to use GPG, the guide also has a section[2] about just using an SSH key as well.
by enasterosophes on 5/30/22, 7:28 AM
by WhyNotHugo on 5/30/22, 1:22 PM
I use them for SSH, but also for 2FA on the web, `sudo` and a few other items. Wrote about it recently here:
https://hugo.barrera.io/journal/2022/05/07/how-i-secure-my-s...
by fmajid on 5/30/22, 10:31 AM
They are thus not limited to Yubico's proprietary functionality controlled by Manager, which has a wider attack surface than I am comfortable with, and are not limited to platforms running the Yubikey Manager software (e.g. on OpenBSD). Since the key has never been outside the USB enclave, there is no way it could have been surreptitiously copied, e.g. if there was a rootkit on the machine where the key was generated before copying to the Yubikey.
by jopsen on 5/30/22, 7:58 AM
Or does the on-the-fly key generation use random bytes stored in the stub?
by veganjay on 5/30/22, 1:20 PM
In the past, I postponed setting this up after I encountered issues. I tried to run "ykman", but it seemed to fight with "yubioath-desktop". It was tricky to debug and I ended up rebooting. I think the reason was that I installed "yubioath-desktop" using snap, which runs "pcscd" as a snap service, and "ykman" wants to start the "pcscd" system service.
Either case, for this tutorial, I skipped the part running 'ykman'. Basically the only commands were:
ssh-keygen -t ed25519-sk -O resident
ssh-add -K
by sandreas on 5/30/22, 7:37 AM
by markstos on 5/30/22, 5:36 PM
Imagine needing to touch the Yubikey with each "git pull" or using Ansible to operate over SSH on a dozen servers in parallel, and needing to touch the Yubikey once for each server.
The feature request I'm tracking is here: https://github.com/FiloSottile/yubikey-agent/issues/95
The proposed feature would allow setting a touch policy for the SSH key.
by ChrisMarshallNY on 5/30/22, 9:25 AM
I have a small encrypted disk image that I mount, after booting my computer. A YubiKey would be similar. I use this to store my really critical stuff. I don’t back up the mounted disk, but do back up the encrypted image.
by a-dub on 5/30/22, 12:59 PM
doesn't that defeat the point of using a yubikey where the private key itself is never read from the device during authentication?
by veganjay on 5/30/22, 3:04 PM
Also, how can one remove the SSH keys from the Yubikey?
I've tried to find articles and SSH on the Yubikey gets very confusing as there seem to be so many techniques!
by veganjay on 5/30/22, 4:39 PM
- https://www.yubico.com/blog/github-now-supports-ssh-security...
- https://developers.yubico.com/SSH/Securing_SSH_with_FIDO2.ht...
- https://developers.yubico.com/SSH/
The second link describes the advantages/disadvantages of non-resident vs. resident keys.
by xvector on 5/30/22, 8:17 AM
by archi42 on 5/30/22, 9:04 AM
For my trusty HyperFIDO Mini (usb id 0x2ccf:0x0880) this doesn't work, though it's rather old (1st gen) and maybe they refreshed it to support this. ssh-keygen fails with "Key enrollment failed: requested feature not supported". I wanted to replace it with a USB-C (& maybe NFC) device anyway, so seems like a good opportunity.
by nyanpasu64 on 5/30/22, 11:29 AM
by ndsipa_pomu on 5/30/22, 9:25 AM
by tazjin on 5/30/22, 7:51 AM
As a result, lots of systems that are not bleeding edge still don't accept them, for example Gerrit.
by gwbas1c on 5/30/22, 4:17 PM
Wait, what? My wife stopped going to Awanas when some leader told her she was going to hell for not learning the Bible verses. Later I learned that her father was pissed off about the whole situation.
by jazzythom on 5/30/22, 9:01 PM
by bschne on 5/30/22, 9:43 AM
by moontear on 5/30/22, 7:51 AM
by jve on 5/30/22, 1:28 PM
by netfortius on 5/30/22, 11:00 AM