# 使用 Homebrew, apt, dnf, MacPorts, Nix, winget 安装 opkssh

查看 opkssh 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:opkssh
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install opkssh
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install opkssh
```

  证据: MacPorts ports tree: net/opkssh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install opkssh
```

  证据: Debian stable package indexes: opkssh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install opkssh
```

  证据: Fedora Rawhide package metadata: opkssh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#opkssh
```

  证据: nixpkgs package indexes: pkgs/by-name/op/opkssh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- winget (92%):

```sh
winget install --id openpubkey.opkssh -e
```

  证据: Windows Package Manager source index: openpubkey.opkssh from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:opkssh
- **软件包管理器:** Homebrew
- **版本:** 0.16.0
- **来源摘要:** Enables SSH to be used with OpenID Connect
- **主页:** <https://eprint.iacr.org/2023/296>
- **仓库:** <https://github.com/openpubkey/opkssh>
- **最后更新:** 2026-07-27T23:46:52+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- opkssh (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.16.0
## 项目历史与用法

opkssh, short for OpenPubkey SSH, brings OpenID Connect identity into ordinary SSH login flows. It lets administrators authorize identities such as email addresses and groups instead of distributing long-lived SSH public keys, while still using the stock SSH client and server protocol.

### 项目历史

The tool is built on OpenPubkey, a protocol described in a 2023 IACR paper that binds a user-held public key into an OpenID Connect ID Token, turning that token into what the authors call a PK Token. opkssh applies that idea to SSH by generating an SSH key/certificate carrying the PK Token and by configuring sshd to verify it.

Cloudflare announced on 2025-03-25 that it had open-sourced OPKSSH under the OpenPubkey project. The announcement says the OpenPubkey protocol became an open source Linux Foundation project in 2023, while OPKSSH had remained closed source under BastionZero, later Cloudflare, until the donation.

### 采用历史

The project moved quickly into normal package-manager territory for a security tool: its metadata lists packages for Homebrew, Debian development packages, Fedora, Nix, and Windows winget, and the README documents Homebrew, winget, Chocolatey, Nix, and direct binary installs.

### 使用方式

A user runs `opkssh login`, authenticates in a browser with an OpenID Provider, and receives a generated SSH key whose public side contains the OpenPubkey token. On the server, opkssh is used through sshd's `AuthorizedKeysCommand` hook, so the verifier can extract the PK Token, validate the identity provider signature and expiry, and map the identity to a Unix or Windows account.

Operators use `/etc/opk/providers` to choose trusted OpenID Providers and client IDs, and `/etc/opk/auth_id` or per-user equivalents to authorize identities, subjects, or group claims. The design gives SSH administrators an SSO-style access list without changing the SSH wire protocol.

### 为什么软件包爱好者会关心

opkssh is interesting because it packages an identity-protocol research result as a small CLI that plugs into a decades-old Unix extension point. For package nerds, the notable bit is not a new daemon or a replacement SSH stack, but a cross-platform binary that makes SSH key lifecycle policy distributable through package managers.

### 时间线

- 2023: OpenPubkey is published as a protocol for binding OpenID Connect ID Tokens to user-held public keys.
- 2023: OpenPubkey becomes an open source Linux Foundation project, according to Cloudflare's OPKSSH open-source announcement.
- 2025-03-25: Cloudflare announces that OPKSSH has been donated to the OpenPubkey project and released as open source.

### Related projects

- OpenPubkey is the underlying protocol. OpenSSH supplies the client/server behavior and `AuthorizedKeysCommand` integration point. The broader ecosystem includes OpenID Providers such as Google, Microsoft Entra ID, GitLab, Keycloak, Authentik, Authelia, Zitadel, and similar OIDC services.

### 来源

- <https://blog.cloudflare.com/open-sourcing-openpubkey-ssh-opkssh-integrating-single-sign-on-with-ssh/>
- <https://eprint.iacr.org/2023/296>
- <https://formulae.brew.sh/formula/opkssh>
- <https://github.com/openpubkey/opkssh>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /etc/opk/providers, /etc/opk/auth_id, /etc/opk/policy.d/*.yml
- Unix: ~/.opk/config.yml
- Windows: %ProgramData%\opk\providers, %ProgramData%\opk\auth_id
## 其他软件包管理器记录

- Debian apt - golang-github-openpubkey-opkssh-dev - 0.4.0-1: normalized package name match | Debian stable package indexes: golang-github-openpubkey-opkssh-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenPubkey SSH tools for OpenID SSH logins (library) | https://github.com/openpubkey/opkssh
- Debian apt - opkssh - 0.4.0-1+b2: normalized package name match | Debian stable package indexes: opkssh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenPubkey SSH tools for OpenID SSH logins (program) | https://github.com/openpubkey/opkssh
- Nix - opkssh: normalized package name match | nixpkgs package indexes: pkgs/by-name/op/opkssh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - opkssh - 0.16.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: opkssh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | OpenPubkey SSH | https://github.com/openpubkey/opkssh
- dnf - opkssh-doc - 0.16.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: opkssh-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Documentation for OpenPubkey SSH | https://github.com/openpubkey/opkssh
- dnf - opkssh-server - 0.16.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: opkssh-server from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Server configuration for OpenPubkey SSH | https://github.com/openpubkey/opkssh
- dnf - opkssh-server-selinux - 0.16.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: opkssh-server-selinux from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | SELinux policy for OpenPubkey SSH | https://github.com/openpubkey/opkssh
- MacPorts - opkssh: normalized package name match | MacPorts ports tree: net/opkssh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - openpubkey.opkssh: normalized package name match | Windows Package Manager source index: openpubkey.opkssh from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/opkssh.yml](https://github.com/mxcl/pkgdb/blob/main/combined/opkssh.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
