xref: /freebsd/crypto/openssh/README.md (revision f374ba41f55c1a127303d92d830dd58eef2f5243)
119261079SEd Maste# Portable OpenSSH
219261079SEd Maste
319261079SEd 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)
419261079SEd 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)
519261079SEd Maste
619261079SEd 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.
719261079SEd Maste
819261079SEd 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).
919261079SEd Maste
1019261079SEd Maste## Documentation
1119261079SEd Maste
1219261079SEd MasteThe official documentation for OpenSSH are the man pages for each tool:
1319261079SEd Maste
1419261079SEd Maste* [ssh(1)](https://man.openbsd.org/ssh.1)
1519261079SEd Maste* [sshd(8)](https://man.openbsd.org/sshd.8)
1619261079SEd Maste* [ssh-keygen(1)](https://man.openbsd.org/ssh-keygen.1)
1719261079SEd Maste* [ssh-agent(1)](https://man.openbsd.org/ssh-agent.1)
1819261079SEd Maste* [scp(1)](https://man.openbsd.org/scp.1)
1919261079SEd Maste* [sftp(1)](https://man.openbsd.org/sftp.1)
2019261079SEd Maste* [ssh-keyscan(8)](https://man.openbsd.org/ssh-keyscan.8)
2119261079SEd Maste* [sftp-server(8)](https://man.openbsd.org/sftp-server.8)
2219261079SEd Maste
2319261079SEd Maste## Stable Releases
2419261079SEd Maste
2519261079SEd 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.
2619261079SEd Maste
2719261079SEd Maste## Building Portable OpenSSH
2819261079SEd Maste
2919261079SEd Maste### Dependencies
3019261079SEd Maste
3119261079SEd MastePortable OpenSSH is built using autoconf and make. It requires a working C compiler, standard library and headers.
3219261079SEd Maste
3338a52bd3SEd Maste``libcrypto`` from either [LibreSSL](https://www.libressl.org/) or [OpenSSL](https://www.openssl.org) may also be used.  OpenSSH may be built without either of these, but the resulting binaries will have only a subset of the cryptographic algorithms normally available.
3419261079SEd Maste
3519261079SEd Maste[zlib](https://www.zlib.net/) is optional; without it transport compression is not supported.
3619261079SEd Maste
37*f374ba41SEd MasteFIDO security token support needs [libfido2](https://github.com/Yubico/libfido2) and its dependencies and will be enabled automatically if they are found.
3838a52bd3SEd Maste
3938a52bd3SEd MasteIn addition, certain platforms and build-time options may require additional dependencies; see README.platform for details about your platform.
4019261079SEd Maste
4119261079SEd Maste### Building a release
4219261079SEd Maste
4319261079SEd MasteReleases include a pre-built copy of the ``configure`` script and may be built using:
4419261079SEd Maste
4519261079SEd Maste```
4619261079SEd Mastetar zxvf openssh-X.YpZ.tar.gz
4719261079SEd Mastecd openssh
4819261079SEd Maste./configure # [options]
4919261079SEd Mastemake && make tests
5019261079SEd Maste```
5119261079SEd Maste
5219261079SEd 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.
5319261079SEd Maste
5419261079SEd Maste### Building from git
5519261079SEd Maste
5619261079SEd 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:
5719261079SEd Maste
5819261079SEd Maste```
5919261079SEd Mastegit clone https://github.com/openssh/openssh-portable # or https://anongit.mindrot.org/openssh.git
6019261079SEd Mastecd openssh-portable
6119261079SEd Masteautoreconf
6219261079SEd Maste./configure
6319261079SEd Mastemake && make tests
6419261079SEd Maste```
6519261079SEd Maste
6619261079SEd Maste### Build-time Customisation
6719261079SEd Maste
6819261079SEd 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).
6919261079SEd Maste
7038a52bd3SEd 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.
7119261079SEd Maste
7219261079SEd MasteFlag | Meaning
7319261079SEd Maste--- | ---
7419261079SEd 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.
7519261079SEd Maste``--with-libedit`` | Enable [libedit](https://www.thrysoee.dk/editline/) support for sftp.
7619261079SEd Maste``--with-kerberos5`` | Enable Kerberos/GSSAPI support. Both [Heimdal](https://www.h5l.org/) and [MIT](https://web.mit.edu/kerberos/) Kerberos implementations are supported.
7719261079SEd Maste``--with-selinux`` | Enable [SELinux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux) support.
7819261079SEd Maste
7919261079SEd Maste## Development
8019261079SEd Maste
8119261079SEd 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/).
8219261079SEd Maste
8319261079SEd Maste## Reporting bugs
8419261079SEd Maste
8519261079SEd 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).
86