# 使用 Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, zypper, apt, scoop, winget 安装 openssh

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

## 安装

```sh
sudo av install brew:openssh
```

## 代理安全回答

openssh provides remote login, key, and transfer tools with broad host access.

- **凭据访问:** Reads SSH keys, agent sockets, known hosts, config, and forwarded credentials.
- **远程变更:** Can execute commands and transfer files on remote hosts.
- **发布/制品风险:** Can deploy files, change servers, and expose forwarded credentials.
- **推荐控制:** Gate remote command execution, scp/sftp writes, key generation, and agent forwarding.
- **代理使用指南:** Allow local key inspection; require approval before connecting to or mutating remote hosts.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install openssh
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install openssh
```

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

### Linux

- apk (92%):

```sh
sudo apk add openssh
```

  证据: Alpine Linux edge package indexes: openssh from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install openssh
```

  证据: Fedora Rawhide package metadata: openssh 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#openssh
```

  证据: nixpkgs package indexes: openssh from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S openssh
```

  证据: Arch Linux sync databases: openssh from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install openssh
```

  证据: openSUSE Tumbleweed package metadata: openssh from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- Debian apt (92%):

```sh
sudo apt install openssh-client
```

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

### Windows

- Chocolatey (92%):

```sh
choco install openssh
```

  证据: Chocolatey community package catalog: openssh from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','openconnect-gui'

- Scoop (92%):

```sh
scoop install main/openssh
```

  证据: Scoop official bucket manifest trees: bucket/openssh.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Syncplify.Server -e
```

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

## 软件包事实

- **软件包键:** brew:openssh
- **软件包管理器:** Homebrew
- **版本:** 10.4p1
- **来源摘要:** OpenBSD freely-licensed SSH connectivity tools
- **主页:** <https://www.openssh.com/>
- **最后更新:** 2026-07-06T18:10:51Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- scp (别名)
- sftp (别名)
- slogin (别名)
- ssh (别名)
- ssh-add (别名)
- ssh-agent (别名)
- ssh-keygen (别名)
- ssh-keyscan (别名)
- sshd (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

OpenSSH is the OpenBSD project's freely licensed implementation of the SSH protocol suite: remote login, remote command execution, file transfer, key management, agent forwarding, and server-side SSH access. The package includes `ssh`, `sshd`, `scp`, `sftp`, `ssh-keygen`, `ssh-agent`, `ssh-add`, and related tools.

### 项目历史

OpenSSH began in 1999 when OpenBSD developers forked Bjorn Gronvall's OSSH, itself derived from Tatu Ylonen's last sufficiently free ssh 1.2.12 release. The OpenSSH project history describes the goal as freeing SSH from license restrictions, cleaning up the code, and maintaining it under the OpenBSD security-audit culture.

The initial import landed on September 26, 1999, shortly before OpenBSD 2.6. The early team removed portability clutter, replaced problematic cryptographic and GPL components, repaired bugs, restored features, and added support for SSH 1.5 and later SSH 2. The OpenBSD manual credits Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt, and Dug Song with creating OpenSSH from the original free ssh base.

OpenSSH's project goal was explicit: because telnet and rlogin are insecure, operating systems should ship SSH support. SSH 2 support became usable around May 4, 2000, solving the integrity and patent-era problems of SSH 1 and giving OpenSSH the protocol base that would become standard for secure administration.

### 采用历史

OpenSSH became infrastructure software because it replaced insecure remote-login and file-transfer tools with a default, scriptable, auditable SSH suite. The portable release made the OpenBSD code usable on Linux, macOS, Cygwin, Solaris, AIX, HP-UX, and other Unix-like systems by adding compatibility layers, PAM/auditing hooks, and platform-specific sandboxing.

Package managers generally split OpenSSH into client and server packages or ship it in the operating-system base. Homebrew's `openssh` formula exists for users who want a packaged OpenSSH newer or different from the system copy, with dependencies such as libfido2 and OpenSSL for modern authentication and crypto support.

### 使用方式

Operators use OpenSSH for daily host access, jump hosts, port forwarding, remote command execution, Git-over-SSH, rsync transport, and automated deployments. Developers touch the package through keys, `~/.ssh/config`, known-host verification, `ssh-agent`, `scp`/`sftp`, and server configuration in `sshd_config`.

OpenSSH also functions as a security policy surface. Choices such as allowed key algorithms, FIDO/U2F support, host key rotation, agent forwarding, chrooting, and subsystem configuration are all exposed through a familiar command and config ecosystem.

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

OpenSSH is one of the canonical examples of a package becoming part of the operating-system substrate. It is both an upstream security project and a downstream packaging problem: vendors patch it, split client/server binaries, coordinate crypto-library choices, and backport fixes because remote access breakage can lock administrators out of machines.

For package nerds, OpenSSH is also a portability case study. The upstream OpenBSD version stays small and tightly audited, while portable OpenSSH carries the compatibility code that lets one security-sensitive codebase work across many Unix variants.

### 时间线

- 1999: OpenBSD developers fork OSSH and import the code on September 26.
- December 1, 1999: OpenBSD 2.6 ships with OpenSSH.
- May 4, 2000: SSH 2 support is implemented sufficiently to be usable.
- 2017: OpenSSH 7.6 removes SSH 1 protocol support.
- 2026: Homebrew packages OpenSSH 10.3p1 in the `openssh` formula.

### Related projects

- OpenSSH descends from Tatu Ylonen's original SSH and Bjorn Gronvall's OSSH. It interacts with crypto libraries such as LibreSSL, OpenSSL, AWS-LC, and BoringSSL, and it overlaps operationally with file-transfer tools, bastion-host systems, VPNs, and configuration-management systems.

### 来源

- <https://formulae.brew.sh/formula/openssh>
- <https://github.com/openssh/openssh-portable>
- <https://man.openbsd.org/ssh.1>
- <https://www.openssh.com/goals.html>
- <https://www.openssh.com/history.html>
- <https://www.openssh.com/portable.html>


## 安全说明

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

- Unix: ~/.ssh/config

## Credential files

- Unix: ~/.ssh/id_*, ~/.ssh/config
## 其他软件包管理器记录

- Debian apt - openssh-client - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: openssh-client from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | secure shell (SSH) client, for secure access to remote machines | https://www.openssh.com/
- Debian apt - openssh-client-gssapi - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: openssh-client-gssapi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | secure shell (SSH) client, with GSS-API support | https://www.openssh.com/
- Debian apt - openssh-server - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: openssh-server from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | secure shell (SSH) server, for secure access from remote machines | https://www.openssh.com/
- Debian apt - openssh-server-gssapi - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: openssh-server-gssapi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | secure shell (SSH) server, with GSS-API key exchange | https://www.openssh.com/
- Debian apt - openssh-sftp-server - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: openssh-sftp-server from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | secure shell (SSH) sftp server module, for SFTP access from remote machines | https://www.openssh.com/
- Debian apt - openssh-tests - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: openssh-tests from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenSSH regression tests | https://www.openssh.com/
- Debian apt - ssh - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: ssh from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | secure shell client and server (metapackage) | https://www.openssh.com/
- Debian apt - ssh-askpass-gnome - 1:10.0p1-7+deb13u4: normalized package name match | Debian stable package indexes: ssh-askpass-gnome from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | interactive X program to prompt users for a passphrase for ssh-add | https://www.openssh.com/
- Nix - openssh: normalized package name match | nixpkgs package indexes: openssh from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - openssh-client - 1:9.6p1-3ubuntu13: normalized package name match | Ubuntu 24.04 LTS package indexes: openssh-client from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | secure shell (SSH) client, for secure access to remote machines | https://www.openssh.com/
- Ubuntu apt - openssh-server - 1:9.6p1-3ubuntu13: normalized package name match | Ubuntu 24.04 LTS package indexes: openssh-server from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | secure shell (SSH) server, for secure access from remote machines | https://www.openssh.com/
- Ubuntu apt - openssh-sftp-server - 1:9.6p1-3ubuntu13: normalized package name match | Ubuntu 24.04 LTS package indexes: openssh-sftp-server from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | secure shell (SSH) sftp server module, for SFTP access from remote machines | https://www.openssh.com/
- Ubuntu apt - openssh-tests - 1:9.6p1-3ubuntu13: normalized package name match | Ubuntu 24.04 LTS package indexes: openssh-tests from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenSSH regression tests | https://www.openssh.com/
- Ubuntu apt - ssh - 1:9.6p1-3ubuntu13: normalized package name match | Ubuntu 24.04 LTS package indexes: ssh from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | secure shell client and server (metapackage) | https://www.openssh.com/
- Ubuntu apt - ssh-askpass-gnome - 1:9.6p1-3ubuntu13: normalized package name match | Ubuntu 24.04 LTS package indexes: ssh-askpass-gnome from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | interactive X program to prompt users for a passphrase for ssh-add | https://www.openssh.com/
- apk - openssh - 10.4_p1-r1: normalized package name match | Alpine Linux edge package indexes: openssh from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Port of OpenBSD's free SSH release | https://www.openssh.com/portable.html


## Combined YAML source

View the package source record on GitHub. [combined/openssh.yml](https://github.com/mxcl/pkgdb/blob/main/combined/openssh.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
- curated agent safety answer
