djm@openbsd.org 6072e4c938 upstream: Split per-connection sshd-session binary
This splits the user authentication code from the sshd-session
binary into a separate sshd-auth binary. This will be executed by
sshd-session to complete the user authentication phase of the
protocol only.

Splitting this code into a separate binary ensures that the crucial
pre-authentication attack surface has an entirely disjoint address
space from the code used for the rest of the connection. It also
yields a small runtime memory saving as the authentication code will
be unloaded after thhe authentication phase completes.

Joint work with markus@ feedback deraadt@

Tested in snaps since last week

OpenBSD-Commit-ID: 9c3b2087ae08626ec31b4177b023db600e986d9c
2024-10-14 14:01:37 +11:00
2024-09-20 08:20:13 +10:00
2024-05-17 14:42:49 +10:00
2024-05-31 19:04:11 +10:00
2019-10-02 10:54:28 +10:00
2017-10-20 12:58:35 +11:00
2017-10-20 12:58:35 +11:00
2020-12-22 19:43:55 +11:00
2016-03-08 06:20:35 +11:00
2023-03-24 13:56:25 +11:00
…
2022-12-06 12:23:08 +11:00
2022-12-06 12:23:08 +11:00
2019-07-29 09:49:23 +10:00
2017-05-10 11:41:21 +10:00
2024-05-17 14:42:49 +10:00
2022-11-10 12:44:51 +11:00
…
2024-02-01 13:42:45 +11:00
2024-09-25 11:15:45 +10:00
2021-07-03 20:36:06 +10:00
2023-03-24 13:56:25 +11:00
2022-12-06 12:23:08 +11:00
2024-09-10 18:45:55 +10:00
2024-06-28 08:37:11 +10:00
2019-10-02 10:54:28 +10:00
2016-07-08 13:50:03 +10:00
2024-09-04 15:38:50 +10:00
2024-08-21 20:24:24 +10:00
2022-04-16 14:33:20 +10:00
2015-01-15 21:39:14 +11:00
…
…
2024-05-17 14:41:37 +10:00
2024-04-03 14:40:32 +11:00
2024-09-20 08:20:13 +10:00
2020-02-11 12:51:24 +11:00
2023-03-03 14:50:03 +11:00
2019-09-19 15:41:23 +10:00
2015-03-23 17:08:12 +11:00
2017-09-12 17:37:02 +10:00
2023-01-06 16:21:39 +11:00
2024-05-17 14:42:49 +10:00
…
2024-08-16 08:30:20 +10:00
2024-07-26 08:51:19 +10:00
2024-08-15 11:01:50 +10:00
2024-09-15 11:23:11 +10:00
2020-12-22 18:56:54 +11:00
2016-11-29 16:51:27 +11:00
…
2018-07-31 12:59:30 +10:00
2017-05-01 10:05:04 +10:00
2021-04-03 17:47:37 +11:00
2018-02-09 20:00:18 +11:00
2022-01-01 15:19:48 +11:00
2024-09-20 08:18:23 +10:00
2018-03-05 10:22:32 +11:00
2024-01-08 13:25:21 +11:00

Portable OpenSSH

C/C++ CI Fuzzing Status Coverity Status

OpenSSH 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.

This is a port of OpenBSD's OpenSSH 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).

Documentation

The official documentation for OpenSSH are the man pages for each tool:

Stable Releases

Stable release tarballs are available from a number of download mirrors. We recommend the use of a stable release for most users. Please read the release notes for details of recent changes and potential incompatibilities.

Building Portable OpenSSH

Dependencies

Portable OpenSSH is built using autoconf and make. It requires a working C compiler, standard library and headers.

libcrypto from either LibreSSL or OpenSSL 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.

zlib is optional; without it transport compression is not supported.

FIDO security token support needs libfido2 and its dependencies and will be enabled automatically if they are found.

In addition, certain platforms and build-time options may require additional dependencies; see README.platform for details about your platform.

Building a release

Releases include a pre-built copy of the configure script and may be built using:

tar zxvf openssh-X.YpZ.tar.gz
cd openssh
./configure # [options]
make && make tests

See the 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.

Building from git

If building from git, you'll need autoconf installed to build the configure script. The following commands will check out and build portable OpenSSH from git:

git clone https://github.com/openssh/openssh-portable # or https://anongit.mindrot.org/openssh.git
cd openssh-portable
autoreconf
./configure
make && make tests

Build-time Customisation

There 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).

For 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.

Flag Meaning
--with-pam Enable PAM support. OpenPAM, Linux PAM and Solaris PAM are supported.
--with-libedit Enable libedit support for sftp.
--with-kerberos5 Enable Kerberos/GSSAPI support. Both Heimdal and MIT Kerberos implementations are supported.
--with-selinux Enable SELinux support.

Development

Portable OpenSSH development is discussed on the openssh-unix-dev mailing list (archive mirror). Bugs and feature requests are tracked on our Bugzilla.

Reporting bugs

Non-security bugs may be reported to the developers via Bugzilla or via the mailing list above. Security bugs should be reported to openssh@openssh.com.

Languages
C 70%
C++ 13.1%
Shell 7.9%
Roff 5%
M4 2.5%
Other 1.5%