Automic VaultAutomic Vault

brew

Install yubikey-agent with Homebrew, apk, apt, Nix

Seamless ssh-agent for YubiKeys and other PIV tokens. Version 0.1.6 via Homebrew; verified 2026-06-06.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install yubikey-agent

local Homebrew formula metadata

Linux

Alpine Linux apkverified · 92%
sudo apk add yubikey-agent

Alpine Linux edge package indexes · yubikey-agent · source: dl-cdn.alpinelinux.org

Debian aptverified · 92%
sudo apt install yubikey-agent

Debian stable package indexes · yubikey-agent · source: deb.debian.org

Nixverified · 92%
nix profile install nixpkgs#yubikey-agent

nixpkgs package indexes · pkgs/by-name/yu/yubikey-agent/package.nix · source: api.github.com

overview

Package summary

Seamless ssh-agent for YubiKeys and other PIV tokens

Commands and aliases

  • yubikey-agent

history

Project history and usage

yubikey-agent is Filippo Valsorda’s Go ssh-agent for YubiKeys and other PIV tokens, packaged because it makes hardware-backed SSH keys feel like a normal SSH_AUTH_SOCK workflow.

Project history

The project appeared publicly in 2020, in the same period when OpenSSH 8.2 introduced native FIDO/U2F security-key support. yubikey-agent chose a different compatibility path: use the YubiKey PIV applet to present ordinary SSH public keys through an agent interface, so existing servers did not need support for the newer `-sk` SSH key types.

The README emphasizes three design goals that shaped its history: one-command setup, resilience across unplugging and sleep, and keys generated on the YubiKey so private material cannot be extracted. It is written in Go and built on go-piv/piv-go plus Go’s SSH libraries.

Its documentation also candidly records the tradeoffs: keeping a persistent PIV transaction helps PIN caching and UX, but can conflict with gpg-agent, YubiKey Manager, and other tools that want the same PIV applet.

Adoption history

Early adoption came from security-conscious developers who wanted hardware-backed SSH without the fragility of gpg-agent, manual PKCS#11 loading, or server-side FIDO2 support. A Hacker News launch discussion in May 2020 framed it as a friendly way to plug in a key and SSH securely with minimal setup.

Packaging spread through Homebrew, AUR/Arch-style packaging, NixOS modules, FreeBSD ports, Alpine testing, Debian, and Ubuntu. The README’s install instructions are package-manager first, which helped the tool become a normal service rather than a custom local build.

How it is used

Users install the package, start the service, run `yubikey-agent -setup` to generate a key on the YubiKey, and point `SSH_AUTH_SOCK` or per-host `IdentityAgent` settings at the agent socket. After that, SSH sees an ordinary agent while the YubiKey enforces PIN and touch policy.

The tool is commonly compared with OpenSSH FIDO2 keys, gpg-agent with the OpenPGP applet, raw ssh-agent PKCS#11 loading, pivy-agent, and macOS Secure Enclave tools such as Secretive. Its niche is the compatibility and UX middle ground: hardware-backed keys with ordinary SSH public-key compatibility.

Why package nerds care

yubikey-agent is a package-nerd favorite because it collapses a historically fiddly stack into one daemon and one socket. It is not the only hardware-backed SSH route, but it is one of the cleanest examples of wrapping smart-card behavior in a familiar Unix interface.

It also tells a packaging story about defaults: Homebrew services, systemd user units, NixOS services, pcscd, and SSH_AUTH_SOCK all matter as much as the binary itself.

Timeline

  • 2020-02: OpenSSH 8.2 introduces built-in FIDO/U2F security-key SSH support, setting the context for hardware-backed SSH alternatives.
  • 2020-04: Early yubikey-agent issue traffic discusses PIV applet locking behavior with YubiKey Manager.
  • 2020-05-10: yubikey-agent is discussed on Hacker News as an easy Go ssh-agent for YubiKeys.
  • 2020-06: Go module metadata shows early v0.1.x releases such as v0.1.2 and v0.1.3.
  • 2020s: The package lands across Homebrew, NixOS/nixpkgs, FreeBSD ports, Arch/AUR, Debian/Ubuntu, and Alpine testing.

Related projects

  • Related projects include go-piv/piv-go, yubico-piv-tool, YKCS11, OpenSSH, gpg-agent, OpenSC, pivy-agent, Secretive, SeKey, YubiKey Manager, and OpenSSH FIDO2 security-key support.

security posture

Risk level: orange

broad file, network, media, or database tool signal. formula declares a Homebrew service.

Risk classifier

orange risk · medium confidence · infrastructure

Why

  • broad file, network, media, or database tool signal
  • formula declares a Homebrew service

Signals

  • metadata:service
  • text:ssh

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Formula metadata declares a service or daemon block.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 2 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
yubikey-agentcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version0.1.6
manager updated2026-06-06
local dataok
upstreamcurrent
latest detectedv0.1.6

https://github.com/FiloSottile/yubikey-agent

  • okNo freshness warnings were generated.

install metadata

Package metadata

Package keybrew:yubikey-agent
Version0.1.6
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/yubikey-agent
Homepagehttps://github.com/FiloSottile/yubikey-agent
Repositoryhttps://github.com/FiloSottile/yubikey-agent
Upstream docshttps://github.com/FiloSottile/yubikey-agent#readme
LicenseBSD-3-Clause
Source archivehttps://github.com/FiloSottile/yubikey-agent/archive/refs/tags/v0.1.6.tar.gz
Last updated2026-06-06T11:29:14Z
Pulseupdated
Build dependenciesgo, pkgconf
Uses from macOSpcsc-lite
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicedeclared
CaveatsTo use this SSH agent, set this variable in your ~/.zshrc and/or ~/.bashrc: export SSH_AUTH_SOCK="$HOMEBREW_PREFIX/var/run/yubikey-agent.sock"

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameyubikey-agent
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

yubikey-agent 0.1.4-2+b19

seamless ssh agent for YubiKeys

https://github.com/FiloSottile/yubikey-agent

sudo apt install yubikey-agent
  • Section: golang
  • Architecture: amd64
  • Source Package: yubikey-agent
  • 3 dependencies
  • normalized package name match
  • Matched by: Yubikey Agent
Debian stable package indexes · deb.debian.org · Debian stable package indexes: yubikey-agent from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

yubikey-agent

nix profile install nixpkgs#yubikey-agent
  • normalized package name match
  • Matched by: Yubikey Agent
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/yu/yubikey-agent/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

yubikey-agent 0.1.4-2build1

seamless ssh agent for YubiKeys

https://github.com/FiloSottile/yubikey-agent

sudo apt install yubikey-agent
  • Section: universe/golang
  • Architecture: amd64
  • 3 dependencies
  • normalized package name match
  • Matched by: Yubikey Agent
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: yubikey-agent from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

yubikey-agent 0.1.6-r22

Seamless ssh-agent for YubiKeys

https://github.com/FiloSottile/yubikey-agent

sudo apk add yubikey-agent
  • License: BSD-3-Clause
  • Architecture: x86_64
  • Source Package: yubikey-agent
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Yubikey Agent
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: yubikey-agent from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment