djm@openbsd.org 7ef3787c84
upstream: ban user/hostnames with most shell metacharacters
This makes ssh(1) refuse user or host names provided on the
commandline that contain most shell metacharacters.

Some programs that invoke ssh(1) using untrusted data do not filter
metacharacters in arguments they supply. This could create
interactions with user-specified ProxyCommand and other directives
that allow shell injection attacks to occur.

It's a mistake to invoke ssh(1) with arbitrary untrusted arguments,
but getting this stuff right can be tricky, so this should prevent
most obvious ways of creating risky situations. It however is not
and cannot be perfect: ssh(1) has no practical way of interpreting
what shell quoting rules are in use and how they interact with the
user's specified ProxyCommand.

To allow configurations that use strange user or hostnames to
continue to work, this strictness is applied only to names coming
from the commandline. Names specified using User or Hostname
directives in ssh_config(5) are not affected.

feedback/ok millert@ markus@ dtucker@ deraadt@

OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9
2023-12-19 01:53:40 +11:00
2023-08-10 20:17:07 +10:00
2022-08-29 13:27:45 +10:00
2022-08-29 13:27:45 +10:00
2019-10-02 10:54:28 +10:00
2023-07-14 17:07:32 +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
2021-12-15 10:50:33 +11:00
2017-05-10 11:41:21 +10:00
2022-11-10 12:44:51 +11:00
2021-10-01 16:36:24 +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
2019-10-02 10:54:28 +10:00
2016-07-08 13:50:03 +10:00
2023-10-26 23:46:03 +11:00
2022-04-16 14:33:20 +10:00
2015-01-15 21:39:14 +11:00
2022-03-31 08:16:38 +11:00
2022-03-26 13:15:44 +11:00
2022-01-01 15:19:48 +11:00
2023-10-04 15:34:10 +11:00
2020-02-11 12:51:24 +11:00
2023-03-03 14:50:03 +11:00
2020-12-22 19:21:26 +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
2022-12-04 22:39:42 +11:00
2022-12-04 22:39:42 +11:00
2023-10-01 10:57:54 +11: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
2023-10-04 15:33:36 +11:00
2018-03-05 10:22:32 +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.

Description
Portable OpenSSH, all Win32-OpenSSH releases and wiki are managed at https://github.com/powershell/Win32-OpenSSH
Readme 84 MiB
Languages
C 78.3%
Shell 6.7%
PowerShell 5.3%
Roff 4.9%
M4 2.4%
Other 2.4%