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