xref: /freebsd/crypto/openssh/INSTALL (revision 462c32cb8d7a451c999a3f1e7d00f9c89e96700c)
183d2307dSDag-Erling Smørgrav1. Prerequisites
283d2307dSDag-Erling Smørgrav----------------
383d2307dSDag-Erling Smørgrav
483d2307dSDag-Erling SmørgravYou will need working installations of Zlib and OpenSSL.
583d2307dSDag-Erling Smørgrav
64518870cSDag-Erling SmørgravZlib 1.1.4 or 1.2.1.2 or greater (ealier 1.2.x versions have problems):
783d2307dSDag-Erling Smørgravhttp://www.gzip.org/zlib/
883d2307dSDag-Erling Smørgrav
983d2307dSDag-Erling SmørgravOpenSSL 0.9.6 or greater:
1083d2307dSDag-Erling Smørgravhttp://www.openssl.org/
1183d2307dSDag-Erling Smørgrav
1283d2307dSDag-Erling Smørgrav(OpenSSL 0.9.5a is partially supported, but some ciphers (SSH protocol 1
134b17dab0SDag-Erling SmørgravBlowfish) do not work correctly.)
1483d2307dSDag-Erling Smørgrav
15761efaa7SDag-Erling SmørgravThe remaining items are optional.
16761efaa7SDag-Erling Smørgrav
1783d2307dSDag-Erling SmørgravNB. If you operating system supports /dev/random, you should configure
1883d2307dSDag-Erling SmørgravOpenSSL to use it. OpenSSH relies on OpenSSL's direct support of
19e146993eSDag-Erling Smørgrav/dev/random, or failing that, either prngd or egd
20d4af9e69SDag-Erling Smørgrav
21d4af9e69SDag-Erling SmørgravPRNGD:
22d4af9e69SDag-Erling Smørgrav
23d4af9e69SDag-Erling SmørgravIf your system lacks kernel-based random collection, the use of Lutz
24d4af9e69SDag-Erling SmørgravJaenicke's PRNGd is recommended.
25d4af9e69SDag-Erling Smørgrav
26d4af9e69SDag-Erling Smørgravhttp://prngd.sourceforge.net/
27d4af9e69SDag-Erling Smørgrav
28d4af9e69SDag-Erling SmørgravEGD:
29d4af9e69SDag-Erling Smørgrav
30d4af9e69SDag-Erling SmørgravThe Entropy Gathering Daemon (EGD) is supported if you have a system which
31d4af9e69SDag-Erling Smørgravlacks /dev/random and don't want to use OpenSSH's internal entropy collection.
32d4af9e69SDag-Erling Smørgrav
33d4af9e69SDag-Erling Smørgravhttp://www.lothar.com/tech/crypto/
3483d2307dSDag-Erling Smørgrav
3583d2307dSDag-Erling SmørgravPAM:
36d4af9e69SDag-Erling Smørgrav
37d4af9e69SDag-Erling SmørgravOpenSSH can utilise Pluggable Authentication Modules (PAM) if your
38d4af9e69SDag-Erling Smørgravsystem supports it. PAM is standard most Linux distributions, Solaris,
39d4af9e69SDag-Erling SmørgravHP-UX 11, AIX >= 5.2, FreeBSD and NetBSD.
40d4af9e69SDag-Erling Smørgrav
41d4af9e69SDag-Erling SmørgravInformation about the various PAM implementations are available:
42d4af9e69SDag-Erling Smørgrav
43d4af9e69SDag-Erling SmørgravSolaris PAM:	http://www.sun.com/software/solaris/pam/
44d4af9e69SDag-Erling SmørgravLinux PAM:	http://www.kernel.org/pub/linux/libs/pam/
45d4af9e69SDag-Erling SmørgravOpenPAM:	http://www.openpam.org/
4683d2307dSDag-Erling Smørgrav
4783d2307dSDag-Erling SmørgravIf you wish to build the GNOME passphrase requester, you will need the GNOME
4883d2307dSDag-Erling Smørgravlibraries and headers.
4983d2307dSDag-Erling Smørgrav
5083d2307dSDag-Erling SmørgravGNOME:
5183d2307dSDag-Erling Smørgravhttp://www.gnome.org/
5283d2307dSDag-Erling Smørgrav
53d74d50a8SDag-Erling SmørgravAlternatively, Jim Knoble <jmknoble@pobox.com> has written an excellent X11
5483d2307dSDag-Erling Smørgravpassphrase requester. This is maintained separately at:
5583d2307dSDag-Erling Smørgrav
56d95e11bfSDag-Erling Smørgravhttp://www.jmknoble.net/software/x11-ssh-askpass/
5783d2307dSDag-Erling Smørgrav
58d4af9e69SDag-Erling SmørgravTCP Wrappers:
5983d2307dSDag-Erling Smørgrav
60d4af9e69SDag-Erling SmørgravIf you wish to use the TCP wrappers functionality you will need at least
61d4af9e69SDag-Erling Smørgravtcpd.h and libwrap.a, either in the standard include and library paths,
62d4af9e69SDag-Erling Smørgravor in the directory specified by --with-tcp-wrappers.  Version 7.6 is
63d4af9e69SDag-Erling Smørgravknown to work.
6483d2307dSDag-Erling Smørgrav
65d4af9e69SDag-Erling Smørgravhttp://ftp.porcupine.org/pub/security/index.html
6683d2307dSDag-Erling Smørgrav
6783d2307dSDag-Erling SmørgravS/Key Libraries:
684518870cSDag-Erling Smørgrav
694518870cSDag-Erling SmørgravIf you wish to use --with-skey then you will need the library below
704518870cSDag-Erling Smørgravinstalled.  No other S/Key library is currently known to be supported.
714518870cSDag-Erling Smørgrav
7283d2307dSDag-Erling Smørgravhttp://www.sparc.spb.su/solaris/skey/
7383d2307dSDag-Erling Smørgrav
745e8dbd04SDag-Erling SmørgravLibEdit:
75761efaa7SDag-Erling Smørgrav
76761efaa7SDag-Erling Smørgravsftp supports command-line editing via NetBSD's libedit.  If your platform
77761efaa7SDag-Erling Smørgravhas it available natively you can use that, alternatively you might try
78761efaa7SDag-Erling Smørgravthese multi-platform ports:
794518870cSDag-Erling Smørgrav
805e8dbd04SDag-Erling Smørgravhttp://www.thrysoee.dk/editline/
815e8dbd04SDag-Erling Smørgravhttp://sourceforge.net/projects/libedit/
825e8dbd04SDag-Erling Smørgrav
83*462c32cbSDag-Erling SmørgravLDNS:
84*462c32cbSDag-Erling Smørgrav
85*462c32cbSDag-Erling SmørgravLDNS is a DNS BSD-licensed resolver library which supports DNSSEC.
86*462c32cbSDag-Erling Smørgrav
87*462c32cbSDag-Erling Smørgravhttp://nlnetlabs.nl/projects/ldns/
88*462c32cbSDag-Erling Smørgrav
89761efaa7SDag-Erling SmørgravAutoconf:
90761efaa7SDag-Erling Smørgrav
91761efaa7SDag-Erling SmørgravIf you modify configure.ac or configure doesn't exist (eg if you checked
92d4af9e69SDag-Erling Smørgravthe code out of CVS yourself) then you will need autoconf-2.61 to rebuild
93d4af9e69SDag-Erling Smørgravthe automatically generated files by running "autoreconf".  Earlier
94d4af9e69SDag-Erling Smørgravversions may also work but this is not guaranteed.
95761efaa7SDag-Erling Smørgrav
96761efaa7SDag-Erling Smørgravhttp://www.gnu.org/software/autoconf/
97761efaa7SDag-Erling Smørgrav
98761efaa7SDag-Erling SmørgravBasic Security Module (BSM):
99761efaa7SDag-Erling Smørgrav
100761efaa7SDag-Erling SmørgravNative BSM support is know to exist in Solaris from at least 2.5.1,
101761efaa7SDag-Erling SmørgravFreeBSD 6.1 and OS X.  Alternatively, you may use the OpenBSM
102761efaa7SDag-Erling Smørgravimplementation (http://www.openbsm.org).
103761efaa7SDag-Erling Smørgrav
104761efaa7SDag-Erling Smørgrav
10583d2307dSDag-Erling Smørgrav2. Building / Installation
10683d2307dSDag-Erling Smørgrav--------------------------
10783d2307dSDag-Erling Smørgrav
10883d2307dSDag-Erling SmørgravTo install OpenSSH with default options:
10983d2307dSDag-Erling Smørgrav
11083d2307dSDag-Erling Smørgrav./configure
11183d2307dSDag-Erling Smørgravmake
11283d2307dSDag-Erling Smørgravmake install
11383d2307dSDag-Erling Smørgrav
11483d2307dSDag-Erling SmørgravThis will install the OpenSSH binaries in /usr/local/bin, configuration files
11583d2307dSDag-Erling Smørgravin /usr/local/etc, the server in /usr/local/sbin, etc. To specify a different
11683d2307dSDag-Erling Smørgravinstallation prefix, use the --prefix option to configure:
11783d2307dSDag-Erling Smørgrav
11883d2307dSDag-Erling Smørgrav./configure --prefix=/opt
11983d2307dSDag-Erling Smørgravmake
12083d2307dSDag-Erling Smørgravmake install
12183d2307dSDag-Erling Smørgrav
12283d2307dSDag-Erling SmørgravWill install OpenSSH in /opt/{bin,etc,lib,sbin}. You can also override
12383d2307dSDag-Erling Smørgravspecific paths, for example:
12483d2307dSDag-Erling Smørgrav
12583d2307dSDag-Erling Smørgrav./configure --prefix=/opt --sysconfdir=/etc/ssh
12683d2307dSDag-Erling Smørgravmake
12783d2307dSDag-Erling Smørgravmake install
12883d2307dSDag-Erling Smørgrav
12983d2307dSDag-Erling SmørgravThis will install the binaries in /opt/{bin,lib,sbin}, but will place the
13083d2307dSDag-Erling Smørgravconfiguration files in /etc/ssh.
13183d2307dSDag-Erling Smørgrav
1324518870cSDag-Erling SmørgravIf you are using Privilege Separation (which is enabled by default)
1334518870cSDag-Erling Smørgravthen you will also need to create the user, group and directory used by
1344518870cSDag-Erling Smørgravsshd for privilege separation.  See README.privsep for details.
1354518870cSDag-Erling Smørgrav
13683d2307dSDag-Erling SmørgravIf you are using PAM, you may need to manually install a PAM control
13783d2307dSDag-Erling Smørgravfile as "/etc/pam.d/sshd" (or wherever your system prefers to keep
13883d2307dSDag-Erling Smørgravthem).  Note that the service name used to start PAM is __progname,
13983d2307dSDag-Erling Smørgravwhich is the basename of the path of your sshd (e.g., the service name
14083d2307dSDag-Erling Smørgravfor /usr/sbin/osshd will be osshd).  If you have renamed your sshd
14183d2307dSDag-Erling Smørgravexecutable, your PAM configuration may need to be modified.
14283d2307dSDag-Erling Smørgrav
14383d2307dSDag-Erling SmørgravA generic PAM configuration is included as "contrib/sshd.pam.generic",
14483d2307dSDag-Erling Smørgravyou may need to edit it before using it on your system. If you are
14583d2307dSDag-Erling Smørgravusing a recent version of Red Hat Linux, the config file in
14683d2307dSDag-Erling Smørgravcontrib/redhat/sshd.pam should be more useful.  Failure to install a
14783d2307dSDag-Erling Smørgravvalid PAM file may result in an inability to use password
14883d2307dSDag-Erling Smørgravauthentication.  On HP-UX 11 and Solaris, the standard /etc/pam.conf
14983d2307dSDag-Erling Smørgravconfiguration will work with sshd (sshd will match the other service
15083d2307dSDag-Erling Smørgravname).
15183d2307dSDag-Erling Smørgrav
15283d2307dSDag-Erling SmørgravThere are a few other options to the configure script:
15383d2307dSDag-Erling Smørgrav
154761efaa7SDag-Erling Smørgrav--with-audit=[module] enable additional auditing via the specified module.
155761efaa7SDag-Erling SmørgravCurrently, drivers for "debug" (additional info via syslog) and "bsm"
156761efaa7SDag-Erling Smørgrav(Sun's Basic Security Module) are supported.
157761efaa7SDag-Erling Smørgrav
158d95e11bfSDag-Erling Smørgrav--with-pam enables PAM support. If PAM support is compiled in, it must
159d95e11bfSDag-Erling Smørgravalso be enabled in sshd_config (refer to the UsePAM directive).
16083d2307dSDag-Erling Smørgrav
16183d2307dSDag-Erling Smørgrav--with-prngd-socket=/some/file allows you to enable EGD or PRNGD
16283d2307dSDag-Erling Smørgravsupport and to specify a PRNGd socket. Use this if your Unix lacks
16383d2307dSDag-Erling Smørgrav/dev/random and you don't want to use OpenSSH's builtin entropy
16483d2307dSDag-Erling Smørgravcollection support.
16583d2307dSDag-Erling Smørgrav
16683d2307dSDag-Erling Smørgrav--with-prngd-port=portnum allows you to enable EGD or PRNGD support
16783d2307dSDag-Erling Smørgravand to specify a EGD localhost TCP port. Use this if your Unix lacks
16883d2307dSDag-Erling Smørgrav/dev/random and you don't want to use OpenSSH's builtin entropy
16983d2307dSDag-Erling Smørgravcollection support.
17083d2307dSDag-Erling Smørgrav
17183d2307dSDag-Erling Smørgrav--with-lastlog=FILE will specify the location of the lastlog file.
17283d2307dSDag-Erling Smørgrav./configure searches a few locations for lastlog, but may not find
17383d2307dSDag-Erling Smørgravit if lastlog is installed in a different place.
17483d2307dSDag-Erling Smørgrav
17583d2307dSDag-Erling Smørgrav--without-lastlog will disable lastlog support entirely.
17683d2307dSDag-Erling Smørgrav
177d95e11bfSDag-Erling Smørgrav--with-osfsia, --without-osfsia will enable or disable OSF1's Security
17883d2307dSDag-Erling SmørgravIntegration Architecture.  The default for OSF1 machines is enable.
17983d2307dSDag-Erling Smørgrav
18083d2307dSDag-Erling Smørgrav--with-skey=PATH will enable S/Key one time password support. You will
18183d2307dSDag-Erling Smørgravneed the S/Key libraries and header files installed for this to work.
18283d2307dSDag-Erling Smørgrav
18383d2307dSDag-Erling Smørgrav--with-tcp-wrappers will enable TCP Wrappers (/etc/hosts.allow|deny)
184d4af9e69SDag-Erling Smørgravsupport.
18583d2307dSDag-Erling Smørgrav
18683d2307dSDag-Erling Smørgrav--with-md5-passwords will enable the use of MD5 passwords. Enable this
187efcad6b7SDag-Erling Smørgravif your operating system uses MD5 passwords and the system crypt() does
188efcad6b7SDag-Erling Smørgravnot support them directly (see the crypt(3/3c) man page). If enabled, the
189efcad6b7SDag-Erling Smørgravresulting binary will support both MD5 and traditional crypt passwords.
19083d2307dSDag-Erling Smørgrav
19183d2307dSDag-Erling Smørgrav--with-utmpx enables utmpx support. utmpx support is automatic for
19283d2307dSDag-Erling Smørgravsome platforms.
19383d2307dSDag-Erling Smørgrav
19483d2307dSDag-Erling Smørgrav--without-shadow disables shadow password support.
19583d2307dSDag-Erling Smørgrav
19683d2307dSDag-Erling Smørgrav--with-ipaddr-display forces the use of a numeric IP address in the
19783d2307dSDag-Erling Smørgrav$DISPLAY environment variable. Some broken systems need this.
19883d2307dSDag-Erling Smørgrav
19983d2307dSDag-Erling Smørgrav--with-default-path=PATH allows you to specify a default $PATH for sessions
20083d2307dSDag-Erling Smørgravstarted by sshd. This replaces the standard path entirely.
20183d2307dSDag-Erling Smørgrav
202d4af9e69SDag-Erling Smørgrav--with-pid-dir=PATH specifies the directory in which the sshd.pid file is
20383d2307dSDag-Erling Smørgravcreated.
20483d2307dSDag-Erling Smørgrav
20583d2307dSDag-Erling Smørgrav--with-xauth=PATH specifies the location of the xauth binary
20683d2307dSDag-Erling Smørgrav
20783d2307dSDag-Erling Smørgrav--with-ssl-dir=DIR allows you to specify where your OpenSSL libraries
20883d2307dSDag-Erling Smørgravare installed.
20983d2307dSDag-Erling Smørgrav
210761efaa7SDag-Erling Smørgrav--with-ssl-engine enables OpenSSL's (hardware) ENGINE support
211761efaa7SDag-Erling Smørgrav
21283d2307dSDag-Erling Smørgrav--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
21383d2307dSDag-Erling Smørgravreal (AF_INET) IPv4 addresses. Works around some quirks on Linux.
21483d2307dSDag-Erling Smørgrav
21583d2307dSDag-Erling SmørgravIf you need to pass special options to the compiler or linker, you
21683d2307dSDag-Erling Smørgravcan specify these as environment variables before running ./configure.
21783d2307dSDag-Erling SmørgravFor example:
21883d2307dSDag-Erling Smørgrav
21983d2307dSDag-Erling SmørgravCFLAGS="-O -m486" LDFLAGS="-s" LIBS="-lrubbish" LD="/usr/foo/ld" ./configure
22083d2307dSDag-Erling Smørgrav
22183d2307dSDag-Erling Smørgrav3. Configuration
22283d2307dSDag-Erling Smørgrav----------------
22383d2307dSDag-Erling Smørgrav
22483d2307dSDag-Erling SmørgravThe runtime configuration files are installed by in ${prefix}/etc or
22583d2307dSDag-Erling Smørgravwhatever you specified as your --sysconfdir (/usr/local/etc by default).
22683d2307dSDag-Erling Smørgrav
22783d2307dSDag-Erling SmørgravThe default configuration should be instantly usable, though you should
22883d2307dSDag-Erling Smørgravreview it to ensure that it matches your security requirements.
22983d2307dSDag-Erling Smørgrav
23083d2307dSDag-Erling SmørgravTo generate a host key, run "make host-key". Alternately you can do so
23183d2307dSDag-Erling Smørgravmanually using the following commands:
23283d2307dSDag-Erling Smørgrav
23383d2307dSDag-Erling Smørgrav    ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
23483d2307dSDag-Erling Smørgrav    ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
23583d2307dSDag-Erling Smørgrav    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
23683d2307dSDag-Erling Smørgrav
23783d2307dSDag-Erling SmørgravReplacing /etc/ssh with the correct path to the configuration directory.
23883d2307dSDag-Erling Smørgrav(${prefix}/etc or whatever you specified with --sysconfdir during
23983d2307dSDag-Erling Smørgravconfiguration)
24083d2307dSDag-Erling Smørgrav
24183d2307dSDag-Erling SmørgravIf you have configured OpenSSH with EGD support, ensure that EGD is
24283d2307dSDag-Erling Smørgravrunning and has collected some Entropy.
24383d2307dSDag-Erling Smørgrav
24483d2307dSDag-Erling SmørgravFor more information on configuration, please refer to the manual pages
24583d2307dSDag-Erling Smørgravfor sshd, ssh and ssh-agent.
24683d2307dSDag-Erling Smørgrav
2475e8dbd04SDag-Erling Smørgrav4. (Optional) Send survey
2485e8dbd04SDag-Erling Smørgrav-------------------------
2495e8dbd04SDag-Erling Smørgrav
2505e8dbd04SDag-Erling Smørgrav$ make survey
251761efaa7SDag-Erling Smørgrav[check the contents of the file "survey" to ensure there's no information
252761efaa7SDag-Erling Smørgravthat you consider sensitive]
2535e8dbd04SDag-Erling Smørgrav$ make send-survey
2545e8dbd04SDag-Erling Smørgrav
2555e8dbd04SDag-Erling SmørgravThis will send configuration information for the currently configured
2565e8dbd04SDag-Erling Smørgravhost to a survey address.  This will help determine which configurations
2575e8dbd04SDag-Erling Smørgravare actually in use, and what valid combinations of configure options
2585e8dbd04SDag-Erling Smørgravexist.  The raw data is available only to the OpenSSH developers, however
2595e8dbd04SDag-Erling Smørgravsummary data may be published.
2605e8dbd04SDag-Erling Smørgrav
2615e8dbd04SDag-Erling Smørgrav5. Problems?
26283d2307dSDag-Erling Smørgrav------------
26383d2307dSDag-Erling Smørgrav
26483d2307dSDag-Erling SmørgravIf you experience problems compiling, installing or running OpenSSH.
26583d2307dSDag-Erling SmørgravPlease refer to the "reporting bugs" section of the webpage at
26683d2307dSDag-Erling Smørgravhttp://www.openssh.com/
26783d2307dSDag-Erling Smørgrav
26883d2307dSDag-Erling Smørgrav
269*462c32cbSDag-Erling Smørgrav$Id: INSTALL,v 1.87 2011/11/04 00:25:25 dtucker Exp $
270