百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Y

yubikey-agent

> AI 编程
开源

yubikey-agent 是一个用于 YubiKeys 的无缝 ssh-agent。

2.9K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

yubikey-agent 是一个用于 YubiKeys 的无缝 ssh-agent。

yubikey-agent

yubikey-agent 是一个用于 YubiKey 的无缝 ssh-agent。

  • 易于使用。 一条命令完成设置,一个环境变量,它就在后台运行。
  • 坚不可摧。 能够容忍拔插、休眠和挂起。永远不需要重启。
  • 兼容性强。 提供适用于所有服务和服务器的公钥。
  • 安全可靠。 密钥在 YubiKey 上生成,无法提取。每次会话都需要 PIN,每次登录都需要触摸。设置会处理 PUK 和管理密钥。

完全用纯 Go 编写,基于 GitHub.com/go-piv/piv-go 和 golang.org/x/crypto/ssh。

安装

macOS

bash
brew install yubikey-agent
brew services start yubikey-agent
yubikey-agent -setup # generate a new key on the YubiKey

然后,将以下行添加到你的 ~/.zshrc 中,并重启 shell。

bash
export SSH_AUTH_SOCK="$(brew --prefix)/var/run/yubikey-agent.sock"

Linux

Arch

在 Arch 上,使用 AUR 中的 yubikey-agent 包。

bash
git clone https://aur.archlinux.org/yubikey-agent.git
cd yubikey-agent && makepkg -si

systemctl daemon-reload --user
sudo systemctl enable --now pcscd.socket
systemctl --user enable --now yubikey-agent

export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/yubikey-agent/yubikey-agent.sock"

NixOS / nixpkgs

在 NixOS unstable 和 20.09(撰写本文时尚未发布)上,你可以 将其添加到你的 /etc/nixos/configuration.nix 中:

services.yubikey-agent.enable = true;

这会安装 yubikey-agent 并设置一个 systemd 单元来为你启动 yubikey-agent。

在使用 nix 的其他系统上,你也可以从 nixpkgs 安装:

nix-env -iA nixpkgs.yubikey-agent

这会安装软件,但不会安装 systemd 单元。你需要 手动设置服务管理(见下文)。

其他基于 systemd 的 Linux 系统

在其他基于 systemd 的 Linux 系统上,请遵循手动安装说明。

非常欢迎打包贡献。

FreeBSD

安装 yubikey-agent 端口

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gocryptographypivsmartcardssh

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.