4 A C compiler. Any C89 or better compiler should work. Where supported,
5 configure will attempt to enable the compiler's run-time integrity checking
6 options. Some notes about specific compilers:
7 - clang: -ftrapv and -sanitize=integer require the compiler-rt runtime
8 (CC=clang LDFLAGS=--rtlib=compiler-rt ./configure)
10 To support Privilege Separation (which is now required) you will need
11 to create the user, group and directory used by sshd for privilege
12 separation. See README.privsep for details.
15 The remaining items are optional.
17 A working installation of zlib:
18 Zlib 1.1.4 or 1.2.1.2 or greater (earlier 1.2.x versions have problems):
19 http://www.gzip.org/zlib/
21 libcrypto from either of LibreSSL or OpenSSL. Building without libcrypto
22 is supported but severely restricts the available ciphers and algorithms.
23 - LibreSSL (https://www.libressl.org/)
24 - OpenSSL (https://www.openssl.org) with any of the following versions:
25 - 1.0.x >= 1.0.1 or 1.1.0 >= 1.1.0g or any 1.1.1
27 Note that due to a bug in EVP_CipherInit OpenSSL 1.1 versions prior to
30 LibreSSL/OpenSSL should be compiled as a position-independent library
31 (i.e. -fPIC, eg by configuring OpenSSL as "./config [options] -fPIC"
32 or LibreSSL as "CFLAGS=-fPIC ./configure") otherwise OpenSSH will not
33 be able to link with it. If you must use a non-position-independent
34 libcrypto, then you may need to configure OpenSSH --without-pie.
36 If you build either from source, running the OpenSSL self-test ("make
37 tests") or the LibreSSL equivalent ("make check") and ensuring that all
38 tests pass is strongly recommended.
40 NB. If you operating system supports /dev/random, you should configure
41 libcrypto (LibreSSL/OpenSSL) to use it. OpenSSH relies on libcrypto's
42 direct support of /dev/random, or failing that, either prngd or egd.
46 If your system lacks kernel-based random collection, the use of Lutz
47 Jaenicke's PRNGd is recommended. It requires that libcrypto be configured
50 http://prngd.sourceforge.net/
54 The Entropy Gathering Daemon (EGD) supports the same interface as prngd.
55 It also supported only if libcrypto is configured to support it.
57 http://egd.sourceforge.net/
61 OpenSSH can utilise Pluggable Authentication Modules (PAM) if your
62 system supports it. PAM is standard most Linux distributions, Solaris,
63 HP-UX 11, AIX >= 5.2, FreeBSD, NetBSD and Mac OS X.
65 Information about the various PAM implementations are available:
67 Solaris PAM: http://www.sun.com/software/solaris/pam/
68 Linux PAM: http://www.kernel.org/pub/linux/libs/pam/
69 OpenPAM: http://www.openpam.org/
71 If you wish to build the GNOME passphrase requester, you will need the GNOME
72 libraries and headers.
77 Alternatively, Jim Knoble <jmknoble@pobox.com> has written an excellent X11
78 passphrase requester. This is maintained separately at:
80 http://www.jmknoble.net/software/x11-ssh-askpass/
84 If you wish to use the TCP wrappers functionality you will need at least
85 tcpd.h and libwrap.a, either in the standard include and library paths,
86 or in the directory specified by --with-tcp-wrappers. Version 7.6 is
89 http://ftp.porcupine.org/pub/security/index.html
93 sftp supports command-line editing via NetBSD's libedit. If your platform
94 has it available natively you can use that, alternatively you might try
95 these multi-platform ports:
97 http://www.thrysoee.dk/editline/
98 http://sourceforge.net/projects/libedit/
102 LDNS is a DNS BSD-licensed resolver library which supports DNSSEC.
104 http://nlnetlabs.nl/projects/ldns/
108 If you modify configure.ac or configure doesn't exist (eg if you checked
109 the code out of git yourself) then you will need autoconf-2.69 and
110 automake-1.16.1 to rebuild the automatically generated files by running
111 "autoreconf". Earlier versions may also work but this is not guaranteed.
113 http://www.gnu.org/software/autoconf/
114 http://www.gnu.org/software/automake/
116 Basic Security Module (BSM):
118 Native BSM support is known to exist in Solaris from at least 2.5.1,
119 FreeBSD 6.1 and OS X. Alternatively, you may use the OpenBSM
120 implementation (http://www.openbsm.org).
124 https://www.x.org/archive/individual/util/
126 If you are making significant changes to the code you may need to rebuild
127 the dependency (.depend) file using "make depend", which requires the
128 "makedepend" tool from the X11 distribution.
132 libfido2 allows the use of hardware security keys over USB. libfido2
133 in turn depends on libcbor. libfido2 >= 1.5.0 is strongly recommended.
134 Limited functionality is possible with earlier libfido2 versions.
136 https://github.com/Yubico/libfido2
137 https://github.com/pjk/libcbor
140 2. Building / Installation
141 --------------------------
143 To install OpenSSH with default options:
149 This will install the OpenSSH binaries in /usr/local/bin, configuration files
150 in /usr/local/etc, the server in /usr/local/sbin, etc. To specify a different
151 installation prefix, use the --prefix option to configure:
153 ./configure --prefix=/opt
157 Will install OpenSSH in /opt/{bin,etc,lib,sbin}. You can also override
158 specific paths, for example:
160 ./configure --prefix=/opt --sysconfdir=/etc/ssh
164 This will install the binaries in /opt/{bin,lib,sbin}, but will place the
165 configuration files in /etc/ssh.
167 If you are using PAM, you may need to manually install a PAM control
168 file as "/etc/pam.d/sshd" (or wherever your system prefers to keep
169 them). Note that the service name used to start PAM is __progname,
170 which is the basename of the path of your sshd (e.g., the service name
171 for /usr/sbin/osshd will be osshd). If you have renamed your sshd
172 executable, your PAM configuration may need to be modified.
174 A generic PAM configuration is included as "contrib/sshd.pam.generic",
175 you may need to edit it before using it on your system. If you are
176 using a recent version of Red Hat Linux, the config file in
177 contrib/redhat/sshd.pam should be more useful. Failure to install a
178 valid PAM file may result in an inability to use password
179 authentication. On HP-UX 11 and Solaris, the standard /etc/pam.conf
180 configuration will work with sshd (sshd will match the other service
183 There are a few other options to the configure script:
185 --with-audit=[module] enable additional auditing via the specified module.
186 Currently, drivers for "debug" (additional info via syslog) and "bsm"
187 (Sun's Basic Security Module) are supported.
189 --with-pam enables PAM support. If PAM support is compiled in, it must
190 also be enabled in sshd_config (refer to the UsePAM directive).
192 --with-prngd-socket=/some/file allows you to enable EGD or PRNGD
193 support and to specify a PRNGd socket. Use this if your Unix lacks
196 --with-prngd-port=portnum allows you to enable EGD or PRNGD support
197 and to specify a EGD localhost TCP port. Use this if your Unix lacks
200 --with-lastlog=FILE will specify the location of the lastlog file.
201 ./configure searches a few locations for lastlog, but may not find
202 it if lastlog is installed in a different place.
204 --without-lastlog will disable lastlog support entirely.
206 --with-osfsia, --without-osfsia will enable or disable OSF1's Security
207 Integration Architecture. The default for OSF1 machines is enable.
209 --with-tcp-wrappers will enable TCP Wrappers (/etc/hosts.allow|deny)
212 --with-utmpx enables utmpx support. utmpx support is automatic for
215 --without-shadow disables shadow password support.
217 --with-ipaddr-display forces the use of a numeric IP address in the
218 $DISPLAY environment variable. Some broken systems need this.
220 --with-default-path=PATH allows you to specify a default $PATH for sessions
221 started by sshd. This replaces the standard path entirely.
223 --with-pid-dir=PATH specifies the directory in which the sshd.pid file is
226 --with-xauth=PATH specifies the location of the xauth binary
228 --with-ssl-dir=DIR allows you to specify where your Libre/OpenSSL
229 libraries are installed.
231 --with-ssl-engine enables Libre/OpenSSL's (hardware) ENGINE support
233 --without-openssl builds without using OpenSSL. Only a subset of ciphers
234 and algorithms are supported in this configuration.
236 --without-zlib builds without zlib. This disables the Compression option.
238 --with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
239 real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
241 If you need to pass special options to the compiler or linker, you
242 can specify these as environment variables before running ./configure.
245 CC="/usr/foo/cc" CFLAGS="-O" LDFLAGS="-s" LIBS="-lrubbish" ./configure
250 The runtime configuration files are installed by in ${prefix}/etc or
251 whatever you specified as your --sysconfdir (/usr/local/etc by default).
253 The default configuration should be instantly usable, though you should
254 review it to ensure that it matches your security requirements.
256 To generate a host key, run "make host-key". Alternately you can do so
257 manually using the following commands:
259 ssh-keygen -t [type] -f /etc/ssh/ssh_host_key -N ""
261 for each of the types you wish to generate (rsa, dsa or ecdsa) or
265 to generate keys for all supported types.
267 Replacing /etc/ssh with the correct path to the configuration directory.
268 (${prefix}/etc or whatever you specified with --sysconfdir during
271 If you have configured OpenSSH with EGD/prngd support, ensure that EGD or
272 prngd is running and has collected some entropy first.
274 For more information on configuration, please refer to the manual pages
275 for sshd, ssh and ssh-agent.
277 4. (Optional) Send survey
278 -------------------------
281 [check the contents of the file "survey" to ensure there's no information
282 that you consider sensitive]
285 This will send configuration information for the currently configured
286 host to a survey address. This will help determine which configurations
287 are actually in use, and what valid combinations of configure options
288 exist. The raw data is available only to the OpenSSH developers, however
289 summary data may be published.
294 If you experience problems compiling, installing or running OpenSSH,
295 please refer to the "reporting bugs" section of the webpage at
296 https://www.openssh.com/