xref: /freebsd/crypto/openssh/README.md (revision 19261079b74319502c6ffa1249920079f0f69a72)
1*19261079SEd Maste# Portable OpenSSH
2*19261079SEd Maste
3*19261079SEd Maste[![C/C++ CI](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/openssh/openssh-portable/actions/workflows/c-cpp.yml)
4*19261079SEd Maste[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh)
5*19261079SEd Maste
6*19261079SEd MasteOpenSSH is a complete implementation of the SSH protocol (version 2) for secure remote login, command execution and file transfer. It includes a client ``ssh`` and server ``sshd``, file transfer utilities ``scp`` and ``sftp`` as well as tools for key generation (``ssh-keygen``), run-time key storage (``ssh-agent``) and a number of supporting programs.
7*19261079SEd Maste
8*19261079SEd MasteThis is a port of OpenBSD's [OpenSSH](https://openssh.com) to most Unix-like operating systems, including Linux, OS X and Cygwin. Portable OpenSSH polyfills OpenBSD APIs that are not available elsewhere, adds sshd sandboxing for more operating systems and includes support for OS-native authentication and auditing (e.g. using PAM).
9*19261079SEd Maste
10*19261079SEd Maste## Documentation
11*19261079SEd Maste
12*19261079SEd MasteThe official documentation for OpenSSH are the man pages for each tool:
13*19261079SEd Maste
14*19261079SEd Maste* [ssh(1)](https://man.openbsd.org/ssh.1)
15*19261079SEd Maste* [sshd(8)](https://man.openbsd.org/sshd.8)
16*19261079SEd Maste* [ssh-keygen(1)](https://man.openbsd.org/ssh-keygen.1)
17*19261079SEd Maste* [ssh-agent(1)](https://man.openbsd.org/ssh-agent.1)
18*19261079SEd Maste* [scp(1)](https://man.openbsd.org/scp.1)
19*19261079SEd Maste* [sftp(1)](https://man.openbsd.org/sftp.1)
20*19261079SEd Maste* [ssh-keyscan(8)](https://man.openbsd.org/ssh-keyscan.8)
21*19261079SEd Maste* [sftp-server(8)](https://man.openbsd.org/sftp-server.8)
22*19261079SEd Maste
23*19261079SEd Maste## Stable Releases
24*19261079SEd Maste
25*19261079SEd MasteStable release tarballs are available from a number of [download mirrors](https://www.openssh.com/portable.html#downloads). We recommend the use of a stable release for most users. Please read the [release notes](https://www.openssh.com/releasenotes.html) for details of recent changes and potential incompatibilities.
26*19261079SEd Maste
27*19261079SEd Maste## Building Portable OpenSSH
28*19261079SEd Maste
29*19261079SEd Maste### Dependencies
30*19261079SEd Maste
31*19261079SEd MastePortable OpenSSH is built using autoconf and make. It requires a working C compiler, standard library and headers.
32*19261079SEd Maste
33*19261079SEd Maste``libcrypto`` from either [LibreSSL](https://www.libressl.org/) or [OpenSSL](https://www.openssl.org) may also be used, but OpenSSH may be built without it supporting a subset of crypto algorithms.
34*19261079SEd Maste
35*19261079SEd Maste[zlib](https://www.zlib.net/) is optional; without it transport compression is not supported.
36*19261079SEd Maste
37*19261079SEd MasteFIDO security token support needs [libfido2](https://github.com/Yubico/libfido2) and its dependencies. Also, certain platforms and build-time options may require additional dependencies; see README.platform for details.
38*19261079SEd Maste
39*19261079SEd Maste### Building a release
40*19261079SEd Maste
41*19261079SEd MasteReleases include a pre-built copy of the ``configure`` script and may be built using:
42*19261079SEd Maste
43*19261079SEd Maste```
44*19261079SEd Mastetar zxvf openssh-X.YpZ.tar.gz
45*19261079SEd Mastecd openssh
46*19261079SEd Maste./configure # [options]
47*19261079SEd Mastemake && make tests
48*19261079SEd Maste```
49*19261079SEd Maste
50*19261079SEd MasteSee the [Build-time Customisation](#build-time-customisation) section below for configure options. If you plan on installing OpenSSH to your system, then you will usually want to specify destination paths.
51*19261079SEd Maste
52*19261079SEd Maste### Building from git
53*19261079SEd Maste
54*19261079SEd MasteIf building from git, you'll need [autoconf](https://www.gnu.org/software/autoconf/) installed to build the ``configure`` script. The following commands will check out and build portable OpenSSH from git:
55*19261079SEd Maste
56*19261079SEd Maste```
57*19261079SEd Mastegit clone https://github.com/openssh/openssh-portable # or https://anongit.mindrot.org/openssh.git
58*19261079SEd Mastecd openssh-portable
59*19261079SEd Masteautoreconf
60*19261079SEd Maste./configure
61*19261079SEd Mastemake && make tests
62*19261079SEd Maste```
63*19261079SEd Maste
64*19261079SEd Maste### Build-time Customisation
65*19261079SEd Maste
66*19261079SEd MasteThere are many build-time customisation options available. All Autoconf destination path flags (e.g. ``--prefix``) are supported (and are usually required if you want to install OpenSSH).
67*19261079SEd Maste
68*19261079SEd MasteFor a full list of available flags, run ``configure --help`` but a few of the more frequently-used ones are described below. Some of these flags will require additional libraries and/or headers be installed.
69*19261079SEd Maste
70*19261079SEd MasteFlag | Meaning
71*19261079SEd Maste--- | ---
72*19261079SEd Maste``--with-pam`` | Enable [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module) support. [OpenPAM](https://www.openpam.org/), [Linux PAM](http://www.linux-pam.org/) and Solaris PAM are supported.
73*19261079SEd Maste``--with-libedit`` | Enable [libedit](https://www.thrysoee.dk/editline/) support for sftp.
74*19261079SEd Maste``--with-kerberos5`` | Enable Kerberos/GSSAPI support. Both [Heimdal](https://www.h5l.org/) and [MIT](https://web.mit.edu/kerberos/) Kerberos implementations are supported.
75*19261079SEd Maste``--with-selinux`` | Enable [SELinux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux) support.
76*19261079SEd Maste``--with-security-key-builtin`` | Include built-in support for U2F/FIDO2 security keys. This requires [libfido2](https://github.com/Yubico/libfido2) be installed.
77*19261079SEd Maste
78*19261079SEd Maste## Development
79*19261079SEd Maste
80*19261079SEd MastePortable OpenSSH development is discussed on the [openssh-unix-dev mailing list](https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev) ([archive mirror](https://marc.info/?l=openssh-unix-dev)). Bugs and feature requests are tracked on our [Bugzilla](https://bugzilla.mindrot.org/).
81*19261079SEd Maste
82*19261079SEd Maste## Reporting bugs
83*19261079SEd Maste
84*19261079SEd Maste_Non-security_ bugs may be reported to the developers via [Bugzilla](https://bugzilla.mindrot.org/) or via the mailing list above. Security bugs should be reported to [openssh@openssh.com](mailto:openssh.openssh.com).
85