<?xml version="1.0"?>

<!DOCTYPE programs SYSTEM "sb-db.dtd"
[
  <!ENTITY SYSCONFDIR "/etc${SB_INSTALL_PREFIX}">
  <!ENTITY PRIVSEPDIR "/var${SB_INSTALL_PREFIX}/chroot">
]>

<programs>
  <program name="openssh" version="6.7">
    <build-name>${SB_PROG_NAME}-${SB_PROG_VER}p1</build-name>

    <install-name>${SB_PROG_NAME}67</install-name>

    <sources>
      <source path="src/${SB_PROG_NAME}-${SB_PROG_VER}p1.tar.gz"/>
      <patch path="src/${SB_PROG_NAME}-${SB_PROG_VER}p1/"/>
      <source path="src/sshd-keygen" noop="1"
        var="SSHD_KEYGEN"
        systype="*-linuxe7"/>
    </sources>

    <dependencies>
      <depend user="sshd"/>
      <depend group="sshd"/>

      <depend program="perl" var="PERL"
        type="build">v==5.16.2</depend>

      <depend program="libedit" var="LIBEDIT"
        install-name="libedit21">v&gt;=2.11</depend>
      <depend program="openssl" var="LIBOPENSSL"
        install-name="libopenssl10">v&gt;=1.0.0k</depend>
      <depend program="zlib" var="LIBZ"
        install-name="libz12">v&gt;=1.2.5</depend>

      <depend program="prngd" var="PRNGD" install-name="prngd"
        systype="*-hpux11.11">v&gt;=0.9.25</depend>
    </dependencies>

    <script-header>
<![CDATA[
_sysconfdir="/etc${SB_INSTALL_PREFIX}"
_prngdsocket="${SB_VAR_PRNGD+/var${SB_VAR_PRNGD}/pool}"
_privsepdir="/var${SB_INSTALL_PREFIX}/chroot"
_default_path="${SB_INSTALL_BASE}/bin"
]]>
    </script-header>

    <configure>
<![CDATA[
case "${SB_SYSTYPE}" in
*-aix*)
  CC=xlc CFLAGS="-O2 -qro -qroconst -qmaxmem=-1 -qarch=ppc"
  LDFLAGS="-Wl,-brtl -Wl,-blibpath:/usr/lib"
  CC_LD_RT="-Wl,-blibpath:"

  SYSTEM_PATH="/usr/bin/X11" PID_DIR=/etc
  ARGS="--with-pam" ;;
ia64*-hpux*)
  CC=cc CFLAGS="-z +O2 +Olit=all +Onofltacc +Oentrysched +Odataprefetch"
  CC_LD_RT="-Wl,+b,"

  SYSTEM_PATH="/usr/bin/X11" PID_DIR="/var/run"
  ARGS="--with-pam" ;;
*-hpux11.11)
  CC=cc CFLAGS="-z +O2 +ESlit +Onofltacc +DAportable \
+Oentrysched +Odataprefetch"
  CC_LD_RT="-Wl,+s,+b,"

  SYSTEM_PATH="/usr/bin/X11" PID_DIR="/var/run"
  ARGS="--with-pam"

  # getnameinfo and getaddrinfo are broken
  export ac_cv_func_getnameinfo=no
  export ac_cv_func_getaddrinfo=no

  # freeaddrinfo requires newer libc
  export ac_cv_func_freeaddrinfo=no ;;
*-hpux*)
  CC=cc CFLAGS="-z +O2 +Olit=all +Onofltacc +Oentrysched +Odataprefetch"
  CC_LD_RT="-Wl,+s,+b,"

  SYSTEM_PATH="/usr/bin/X11" PID_DIR="/var/run"
  ARGS="--with-pam" ;;
i?86*-linux*)
  CFLAGS="-O2 -mtune=pentiumpro -march=pentiumpro"
  CC_LD_RT="-Wl,-rpath,"

  SYSTEM_PATH="/usr/bin/X11" PID_DIR="/var/run"
  ARGS="--with-pam --with-md5-passwords" ;;
*-linux*)
  CC_LD_RT="-Wl,-rpath,"

  SYSTEM_PATH="/usr/bin/X11" PID_DIR="/var/run"
  ARGS="--with-pam --with-md5-passwords" ;;
i?86*-solaris*)
  CC=cc CFLAGS="-mr -Qn -xstrconst -xO2 -xtarget=pentium4"
  CC_LD_RT="-R"

  SYSTEM_PATH="/usr/dt/bin:/usr/openwin/bin"
  PID_DIR="/var/run" ARGS="--with-pam" ;;
*-solaris2.8)
  CC=cc CFLAGS="-mr -Qn -xstrconst -xO2 -xtarget=ultra2 \
-xarch=v8plusa"
  CC_LD_RT="-R"

  SYSTEM_PATH="/usr/dt/bin:/usr/openwin/bin"
  PID_DIR="/var/run" ARGS="--with-pam" ;;
*-solaris*)
  CC=cc CFLAGS="-mr -Qn -xstrconst -xO2 -xtarget=ultra2 \
-m32 -xarch=sparcvis"
  CC_LD_RT="-R"

  SYSTEM_PATH="/usr/dt/bin:/usr/openwin/bin"
  PID_DIR="/var/run" ARGS="--with-pam" ;;
esac

${SHELL} ./configure CC="${CC:-gcc}" CFLAGS="${CFLAGS:--O2}" \
LDFLAGS="${CC_LD_RT}${SB_VAR_LIBEDIT_LIB}:${SB_VAR_LIBOPENSSL_LIB}:\
${SB_VAR_LIBZ_LIB} ${LDFLAGS+${LDFLAGS}}" \
PERL=${SB_VAR_PERL}/bin/perl \
${SB_VAR_PRNGD+--with-prngd-socket=${_prngdsocket}} \
${SB_VAR_LIBKRB5+--with-kerberos5=${SB_VAR_LIBKRB5}} \
--sysconfdir=${_sysconfdir} --with-pid-dir=${PID_DIR} \
--with-privsep-path=${_privsepdir} \
--with-ssl-dir=${SB_VAR_LIBOPENSSL} --with-mantype=man \
--with-default-path="/bin:/usr/bin:/sbin:/usr/sbin:\
${SB_INSTALL_PREFIX}/bin:${SYSTEM_PATH}:/opt/local/bin:/opt/local/sbin:\
/usr/local/bin:/usr/local/sbin${_default_path+:${_default_path}}" \
--disable-strip --with-privsep-user=sshd \
--with-libedit=${SB_VAR_LIBEDIT} --with-zlib=${SB_VAR_LIBZ} \
--with-rpath=no ${ARGS+${ARGS}} --mandir="${SB_INSTALL_PREFIX}/man" \
--prefix=${SB_INSTALL_PREFIX}
]]>
    </configure>

    <install>
<![CDATA[
gmake install-nokeys

case "${SB_SYSTYPE}" in
*-linuxe7)
  ${SB_PATH_INSTALL} -m 755 -o root -d ${SB_INSTALL_PREFIX}/libexec
  ${SB_PATH_INSTALL} -m 755 -o root -g 0 ${SB_SRC_SSHD_KEYGEN} \
    ${SB_INSTALL_PREFIX}/libexec
  ${SB_PATH_SED} -i -e "\
s!@SB_INSTALL_PREFIX@!${SB_INSTALL_PREFIX}!g" \
  ${SB_INSTALL_PREFIX}/libexec/sshd-keygen ;;
esac

for _config in shosts.equiv ssh_host_dsa_key ssh_host_dsa_key.pub \
ssh_host_key ssh_host_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub \
ssh_known_hosts; do
  [ ! -f "${_sysconfdir}/${_config}" ] && \
  ${SB_PATH_INSTALL} -m 644 -o root -g 0 /dev/null ${_sysconfdir}/${_config}
done

${SB_PATH_CHMOD} 600 ${_sysconfdir}/ssh_host_dsa_key \
${_sysconfdir}/ssh_host_key ${_sysconfdir}/ssh_host_rsa_key

${SB_PATH_INSTALL} -m 111 -o root -g 0 -d ${_privsepdir}

# fix X11UseLocalhost depending on platform
case "${SB_SYSTYPE}" in
hppa*-hpux11.23)
  ${SB_PATH_SED} -i -e "\
/^#X11UseLocalhost yes/ {
a\\
X11UseLocalhost no
}" ${_sysconfdir}/sshd_config ;;
esac
]]>
    </install>

    <uninstall>
<![CDATA[
rm -rf ${SB_INSTALL_PREFIX} ${_sysconfdir} ${_privsepdir}
]]>
    </uninstall>

    <licenses>
      <para>The licences which components of this software fall under
are as follows. First, we will summarize and say that all components
are under a BSD licence, or a licence more free than that.</para>

      <para>OpenSSH contains no GPL code.</para>

      <license>
        <para>Copyright (c) 1995 Tatu Ylonen &lt;ylo@cs.hut.fi&gt;,
Espoo, Finland. All rights reserved.</para>

        <para>As far as I am concerned, the code I have written for
this software can be used freely for any purpose. Any derived
versions of this software must be clearly marked as such, and if the
derived work is incompatible with the protocol description in the RFC
file, it must be called by a name other than "ssh" or "Secure
Shell".</para>

        <para>However, I am not implying to give any licenses to any
patents or copyrights held by third parties, and the software includes
parts that are not under my direct control. As far as I know, all
included source code is used in accordance with the relevant license
agreements and can be used freely for any purpose (the GNU license
being the most restrictive); see below for details.</para>

        <para>[sidebar] However, none of that term is relevant at this
point in time. All of these restrictively licenced software components
which he talks about have been removed from OpenSSH, i.e.,</para>
        <unorderedlist>
          <item><para>RSA is no longer included, found in the OpenSSL
library</para></item>
          <item><para>IDEA is no longer included, its use is
deprecated</para></item>
          <item><para>DES is now external, in the OpenSSL
library</para></item>
          <item><para>GMP is no longer used, and instead we call BN
code from OpenSSL</para></item>
          <item><para>Zlib is now external, in a library</para></item>
          <item><para>The make-ssh-known-hosts script is no longer
included</para></item>
          <item><para>TSS has been removed</para></item>
          <item><para>MD5 is now external, in the OpenSSL
library</para></item>
          <item><para>RC4 support has been replaced with ARC4 support
from OpenSSL</para></item>
          <item><para>Blowfish is now external, in the OpenSSL
library</para></item>
        </unorderedlist>

        <para>Note that any information and cryptographic algorithms
used in this software are publicly available on the Internet and at
any major bookstore, scientific library, and patent office worldwide.
More information can be found e.g. at "<ulink
url="http://www.cs.hut.fi/crypto">http://www.cs.hut.fi/crypto</ulink>".</para>

        <para>The legal status of this program is some combination of
all these permissions and restrictions.  Use only at your own
responsibility. You will be responsible for any legal consequences
yourself; I am not making any claims whether possessing or using this
is legal or not in your country, and I am not taking any
responsibility on your behalf.</para>

        <para align="center">NO WARRANTY</para>

        <para>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS
NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</para>

        <para>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.</para>
      </license>

      <license>
        <para>The 32-bit CRC compensation attack detector in
deattack.c was contributed by CORE SDI S.A. under a BSD-style
license.</para>

        <para>Cryptographic attack detector for ssh - source
code</para>

        <para>Copyright (c) 1998 CORE SDI S.A., Buenos Aires,
Argentina.</para>
        <para>All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided
that this copyright notice is retained.</para>
        <para>THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES ARE DISCLAIMED. IN NO EVENT SHALL CORE SDI S.A. BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR
CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OR MISUSE OF THIS
SOFTWARE.</para>

        <para>Ariel Futoransky &lt;futo@core-sdi.com&gt;</para>
        <para><ulink
url="http://www.core-sdi.com">http://www.core-sdi.com</ulink></para>
      </license>

      <license>
        <para>ssh-keyscan was contributed by David Mazieres under a
BSD-style license.</para>

        <para>Copyright 1995, 1996 by David Mazieres
&lt;dm@lcs.mit.edu&gt;.</para>
     
        <para>Modification and redistribution in source and binary
forms is permitted provided that due credit is given to the author and
the OpenBSD project by leaving this copyright notice intact.</para>
      </license>

      <license>
        <para>The Rijndael implementation by Vincent Rijmen, Antoon
Bosselaers and Paulo Barreto is in the public domain and distributed
with the following license:</para>

        <para>@version 3.0 (December 2000)</para>

        <para>Optimised ANSI C code for the Rijndael cipher (now
AES)</para>

        <para>@author Vincent Rijmen
&lt;vincent.rijmen@esat.kuleuven.ac.be&gt;</para>
        <para>@author Antoon Bosselaers
&lt;antoon.bosselaers@esat.kuleuven.ac.be&gt;</para>
        <para>@author Paulo Barreto
&lt;paulo.barreto@terra.com.br&gt;</para>
     
        <para>This code is hereby placed in the public domain.</para>

        <para>THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
      </license>

      <license>
        <para>One component of the ssh source code is under a 3-clause
BSD license, held by the University of California, since we pulled
these parts from original Berkeley code.</para>

        <para>Copyright (c) 1983, 1990, 1992, 1993, 1995</para>
        <para>The Regents of the University of California.  All rights
reserved.</para>

        <para>Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the following
conditions are met:</para>
        <orderedlist>
          <item><para>Redistributions of source code must retain the
above copyright notice, this list of conditions and the following
disclaimer.</para></item>
          <item><para>Redistributions in binary form must reproduce
the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.</para></item>
          <item><para>Neither the name of the University nor the names
of its contributors may be used to endorse or promote products derived
from this software without specific prior written
permission.</para></item>
        </orderedlist>

        <para>THIS SOFTWARE IS PROVIDED BY THE REGENTS AND
CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
      </license>

      <license>
        <para>Remaining components of the software are provided under
a standard 2-term BSD licence with the following names as copyright
holders:</para>
        <unorderedlist>
	  <item><para>Markus Friedl</para></item>
	  <item><para>Theo de Raadt</para></item>
	  <item><para>Niels Provos</para></item>
	  <item><para>Dug Song</para></item>
	  <item><para>Aaron Campbell</para></item>
	  <item><para>Damien Miller</para></item>
	  <item><para>Kevin Steves</para></item>
	  <item><para>Daniel Kouril</para></item>
	  <item><para>Wesley Griffin</para></item>
	  <item><para>Per Allansson</para></item>
	  <item><para>Nils Nordman</para></item>
	  <item><para>Simon Wilkinson</para></item>
        </unorderedlist>

        <para>Portable OpenSSH additionally includes code from the
following copyright holders, also under the 2-term BSD license:</para>
        <unorderedlist>
	  <item><para>Ben Lindstrom</para></item>
	  <item><para>Tim Rice</para></item>
	  <item><para>Andre Lucas</para></item>
	  <item><para>Chris Adams</para></item>
	  <item><para>Corinna Vinschen</para></item>
	  <item><para>Cray Inc.</para></item>
	  <item><para>Denis Parker</para></item>
	  <item><para>Gert Doering</para></item>
	  <item><para>Jakob Schlyter</para></item>
	  <item><para>Jason Downs</para></item>
	  <item><para>Juha Yrjl</para></item>
	  <item><para>Michael Stone</para></item>
	  <item><para>Networks Associates Technology,
Inc.</para></item>
	   <item><para>Solar Designer</para></item>
	  <item><para>Todd C. Miller</para></item>
	  <item><para>Wayne Schroeder</para></item>
	  <item><para>William Jones</para></item>
	  <item><para>Darren Tucker</para></item>
	  <item><para>Sun Microsystems</para></item>
	  <item><para>The SCO Group</para></item>
	  <item><para>Daniel Walsh</para></item>
        </unorderedlist>

        <para>Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the following
conditions are met:</para>
        <orderedlist>
          <item><para>Redistributions of source code must retain the
above copyright notice, this list of conditions and the following
disclaimer.</para></item>
          <item><para>Redistributions in binary form must reproduce
the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.</para></item>
        </orderedlist>

        <para>THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
      </license>

      <license module="md5crypt.c, md5crypt.h">
        <para>"THE BEER-WARE LICENSE" (Revision 42):
&lt;phk@login.dknet.dk&gt; wrote this file.  As long as you retain
this notice you can do whatever you want with this stuff. If we meet
some day, and you think this stuff is worth it, you can buy me a beer
in return. Poul-Henning Kamp.</para>
      </license>

      <license module="snprintf replacement">
        <para>Copyright Patrick Powell 1995. This code is based on
code written by Patrick Powell (papowell@astart.com) It may be used
for any purpose as long as this notice remains intact on all source
code distributions.</para>
      </license>

      <license module="Compatibility code (openbsd-compat)">
        <para>Apart from the previously mentioned licenses, various
pieces of code in the openbsd-compat/ subdirectory are licensed as
follows:</para>
        <unorderedlist>
          <item><para>Some code is licensed under a 3-term BSD
license, to the following copyright holders:</para>
          <unorderedlist>
	    <item><para>Todd C. Miller</para></item>
	    <item><para>Theo de Raadt</para></item>
	    <item><para>Damien Miller</para></item>
	    <item><para>Eric P. Allman</para></item>
	    <item><para>The Regents of the University of
California</para></item>
	    <item><para>Constantin S. Svintsoff</para></item>
          </unorderedlist>

	  <para>Redistribution and use in source and binary
forms, with or without modification, are permitted provided that the
following conditions are met:</para>
          <orderedlist>
	    <item><para>Redistributions of source code must retain the
above copyright notice, this list of conditions and the following
disclaimer.</para></item>
	    <item><para>Redistributions in binary form must reproduce
the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.</para></item>
	    <item><para>Neither the name of the University nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.</para></item>
          </orderedlist>

          <para>THIS SOFTWARE IS PROVIDED BY THE REGENTS AND
CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para></item>

          <item><para>Some code is licensed under an ISC-style
license, to the following copyright holders:</para>
          <unorderedlist>
	    <item><para>Internet Software Consortium</para></item>
	    <item><para>Todd C. Miller</para></item>
	    <item><para>Reyk Floeter</para></item>
	    <item><para>Chad Mynhier</para></item>
          </unorderedlist>

          <para>Permission to use, copy, modify, and distribute this
software for any purpose with or without fee is hereby granted,
provided that the above copyright notice and this permission notice
appear in all copies.</para>

          <para>THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
TODD C. MILLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.</para></item>

          <item><para>Some code is licensed under a MIT-style license
to the following copyright holders:</para>

	  <para>Free Software Foundation, Inc.</para>
          <para>Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, distribute with modifications, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:</para>
          <para>The above copyright notice and this permission notice
shall be included in all copies or substantial portions of the
Software.</para>
          <para>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</para>
          <para>Except as contained in this notice, the name(s) of the
above copyright holders shall not be used in advertising or otherwise
to promote the sale, use or other dealings in this Software without
prior written authorization.</para></item>
        </unorderedlist>
      </license>
    </licenses>

    <notes>
      <change from="6.6" to="6.7">
        <items name="Potentially-incompatible changes">
          <item><para>sshd(8): The default set of ciphers and MACs has
been altered to remove unsafe algorithms. In particular, CBC ciphers
and arcfour* are disabled by default.</para>
          <para>The full set of algorithms remains available if
configured explicitly via the Ciphers and MACs sshd_config
options.</para></item>
          <item><para>sshd(8): Support for tcpwrappers/libwrap has
been removed.</para></item>
          <item><para>OpenSSH 6.5 and 6.6 have a bug that causes ~0.2%
of connections using the curve25519-sha256@libssh.org KEX exchange
method to fail when connecting with something that implements the
specification correctly. OpenSSH 6.7 disables this KEX method when
speaking to one of the affected versions.</para></item>
        </items>

        <items name="Features">
          <item><para>Major internal refactoring to begin to make part
of OpenSSH usable as a library. So far the wire parsing, key handling
and KRL code has been refactored. Please note that we do not consider
the API stable yet, nor do we offer the library in separable
form.</para></item>
          <item><para>ssh(1), sshd(8): Add support for Unix domain
socket forwarding. A remote TCP port may be forwarded to a local Unix
domain socket and vice versa or both ends may be a Unix domain
socket.</para></item>
          <item><para>ssh(1), ssh-keygen(1): Add support for SSHFP DNS
records for ED25519 key types.</para></item>
          <item><para>sftp(1): Allow resumption of interrupted
uploads.</para></item>
          <item><para>ssh(1): When rekeying, skip file/DNS lookups of
the hostkey if it is the same as the one sent during initial key
exchange; bz#2154</para></item>
          <item><para>sshd(8): Allow explicit ::1 and 127.0.0.1
forwarding bind addresses when GatewayPorts=no; allows client to
choose address family; bz#2222</para></item>
          <item><para>sshd(8): Add a sshd_config PermitUserRC option
to control whether ~/.ssh/rc is executed, mirroring the no-user-rc
authorized_keys option; bz#2160</para></item>
          <item><para>ssh(1): Add a %C escape sequence for
LocalCommand and ControlPath that expands to a unique identifer based
on a hash of the tuple of (local host, remote user, hostname, port).
Helps avoid exceeding miserly pathname limits for Unix domain sockets
in multiplexing control paths; bz#2220</para></item>
          <item><para>sshd(8): Make the "Too many authentication
failures" message include the user, source address, port and protocol
in a format similar to the authentication success / failure messages;
bz#2199</para></item>
          <item><para>Added unit and fuzz tests for refactored code.
These are run automatically in portable OpenSSH via the "make tests"
target.</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>sshd(8): Fix remote forwarding with the same
listen port but different listen address.</para></item>
          <item><para>ssh(1): Fix inverted test that caused PKCS#11
keys that were explicitly listed in ssh_config or on the commandline
not to be preferred.</para></item>
          <item><para>ssh-keygen(1): Fix bug in KRL generation:
multiple consecutive revoked certificate serial number ranges could be
serialised to an invalid format. Readers of a broken KRL caused by
this bug will fail closed, so no should-have-been-revoked key will be
accepted.</para></item>
          <item><para>ssh(1): Reflect stdio-forward ("ssh -W host:port
...") failures in exit status. Previously we were always returning 0;
bz#2255</para></item>
          <item><para>ssh(1), ssh-keygen(1): Make Ed25519 keys' title
fit properly in the randomart border; bz#2247</para></item>
          <item><para>ssh-agent(1): Only cleanup agent socket in the
main agent process and not in any subprocesses it may have started
(e.g. forked askpass). Fixes agent sockets being zapped when askpass
processes fatal(); bz#2236</para></item>
          <item><para>ssh-add(1): Make stdout line-buffered; saves
partial output getting lost when ssh-add fatal()s part-way through
(e.g. when listing keys from an agent that supports key types that
ssh-add doesn't); bz#2234</para></item>
          <item><para>ssh-keygen(1): When hashing or removing hosts,
don't choke on @revoked markers and don't remove @cert-authority
markers; bz#2241</para></item>
          <item><para>ssh(1): Don't fatal when hostname
canonicalisation fails and a ProxyCommand is in use; continue and
allow the ProxyCommand to connect anyway (e.g. to a host with a name
outside the DNS behind a bastion)</para></item>
          <item><para>scp(1): When copying local->remote fails during
read, don't send uninitialised heap to the remote end.</para></item>
          <item><para>sftp(1): Fix fatal "el_insertstr failed" errors
when tab-completing filenames with  a single quote char somewhere in
the string; bz#2238</para></item>
          <item><para>ssh-keyscan(1): Scan for Ed25519 keys by
default.</para></item>
          <item><para>ssh(1): When using VerifyHostKeyDNS with a
DNSSEC resolver, down- convert any certificate keys to plain keys and
attempt SSHFP resolution.  Prevents a server from skipping SSHFP
lookup and forcing a new-hostkey dialog by offering only certificate
keys.</para></item>
          <item><para>sshd(8): Avoid crash at exit via NULL pointer
reference; bz#2225</para></item>
          <item><para>Fix some strict-alignment errors.</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>Portable OpenSSH now supports building against
libressl-portable.</para></item>
          <item><para>Portable OpenSSH now requires openssl 0.9.8f or
greater. Older versions are no longer supported.</para></item>
          <item><para>In the OpenSSL version check, allow fix version
upgrades (but not downgrades. Debian bug #748150.</para></item>
          <item><para>sshd(8): On Cygwin, determine privilege
separation user at runtime, since it may need to be a domain
account.</para></item>
          <item><para>sshd(8): Don't attempt to use vhangup on Linux.
It doesn't work for non-root users, and for them it just messes up the
tty settings.</para></item>
          <item><para>Use CLOCK_BOOTTIME in preference to
CLOCK_MONOTONIC when it is available. It considers time spent
suspended, thereby ensuring timeouts (e.g. for expiring agent keys)
fire correctly.  bz#2228</para></item>
          <item><para>Add support for ed25519 to opensshd.init init
script.</para></item>
          <item><para>sftp-server(8): On platforms that support it,
use prctl() to prevent sftp-server from accessing
/proc/self/{mem,maps}</para></item>
        </items>
      </change>

      <change from="6.5" to="6.6">
        <items name="Security">
          <item><para>sshd(8): when using environment passing with a
sshd_config(5) AcceptEnv pattern with a wildcard. OpenSSH prior to 6.6
could be tricked into accepting any enviornment variable that contains
the characters before the wildcard character.</para></item>
        </items>

        <items name="Features">
          <item><para>ssh(1), sshd(8): this release removes the J-PAKE
authentication code. This code was experimental, never enabled and had
been unmaintained for some time.</para></item>
          <item><para>ssh(1): when processing Match blocks, skip
'exec' clauses other clauses predicates failed to match.</para></item>
          <item><para>ssh(1): if hostname canonicalisation is enabled
and results in the destination hostname being changed, then re-parse
ssh_config(5) files using the new destination hostname. This gives
'Host' and 'Match' directives that use the expanded hostname a chance
to be applied.</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>ssh(1): avoid spurious "getsockname failed: Bad
file descriptor" in ssh -W. bz#2200, debian#738692</para></item>
          <item><para>sshd(8): allow the shutdown(2) syscall in
seccomp-bpf and systrace sandbox modes, as it is reachable if the
connection is terminated during the pre-auth phase.</para></item>
          <item><para>ssh(1), sshd(8): fix unsigned overflow that in
SSH protocol 1 bignum parsing. Minimum key length checks render this
bug unexploitable to compromise SSH 1 sessions.</para></item>
          <item><para>sshd_config(5): clarify behaviour of a keyword
that appears in multiple matching Match blocks. bz#2184</para></item>
          <item><para>ssh(1): avoid unnecessary hostname lookups when
canonicalisation is disabled. bz#2205</para></item>
          <item><para>sshd(8): avoid sandbox violation crashes in
GSSAPI code by caching the supported list of GSSAPI mechanism OIDs
before entering the sandbox. bz#2107</para></item>
          <item><para>ssh(1): fix possible crashes in SOCKS4 parsing
caused by assumption that the SOCKS username is
nul-terminated.</para></item>
          <item><para>ssh(1): fix regression for UsePrivilegedPort=yes
when BindAddress is not specified.</para></item>
          <item><para>ssh(1), sshd(8): fix memory leak in ECDSA
signature verification.</para></item>
          <item><para>ssh(1): fix matching of 'Host' directives in
ssh_config(5) files to be case-insensitive again (regression in
6.5).</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>sshd(8): don't fatal if the FreeBSD Capsicum is
offered by the system headers and libc but is not supported by the
kernel.</para></item>
          <item><para>Fix build using the HP-UX
compiler.</para></item>
        </items>
      </change>

      <change from="6.4" to="6.5">
        <items name="Features">
          <item><para>ssh(1), sshd(8): Add support for key exchange
using elliptic-curve Diffie Hellman in Daniel Bernstein's Curve25519.
This key exchange method is the default when both the client and
server support it.</para></item>
          <item><para>ssh(1), sshd(8): Add support for Ed25519 as a
public key type. Ed25519 is a elliptic curve signature scheme that
offers better security than ECDSA and DSA and good performance. It may
be used for both user and host keys.</para></item>
          <item><para>Add a new private key format that uses a bcrypt
KDF to better protect keys at rest. This format is used
unconditionally for Ed25519 keys, but may be requested when generating
or saving existing keys of other types via the -o ssh-keygen(1)
option. We intend to make the new format the default in the near
future. Details of the new format are in the PROTOCOL.key
file.</para></item>
          <item><para>ssh(1), sshd(8): Add a new transport cipher
"chacha20-poly1305@openssh.com" that combines Daniel Bernstein's
ChaCha20 stream cipher and Poly1305 MAC to build an authenticated
encryption mode. Details are in the PROTOCOL.chacha20poly1305
file.</para></item>
          <item><para>ssh(1), sshd(8): Refuse RSA keys from old
proprietary clients and servers that use the obsolete RSA+MD5
signature scheme. It will still be possible to connect with these
clients/servers but only DSA keys will be accepted, and OpenSSH will
refuse connection entirely in a future release.</para></item>
          <item><para>ssh(1), sshd(8): Refuse old proprietary clients
and servers that use a weaker key exchange hash
calculation.</para></item>
          <item><para>ssh(1): Increase the size of the Diffie-Hellman
groups requested for each symmetric key size. New values from NIST
Special Publication 800-57 with the upper limit specified by
RFC4419.</para></item>
          <item><para>ssh(1), ssh-agent(1): Support PKCS#11 tokens
that only provide X.509 certs instead of raw public keys (requested as
bz#1908).</para></item>
          <item><para>ssh(1): Add a ssh_config(5) "Match" keyword that
allows conditional configuration to be applied by matching on
hostname, user and result of arbitrary commands.</para></item>
          <item><para>ssh(1): Add support for client-side hostname
canonicalisation using a set of DNS suffixes and rules in
ssh_config(5). This allows unqualified names to be canonicalised to
fully-qualified domain names to eliminate ambiguity when looking up
keys in known_hosts or checking host certificate names.</para></item>
          <item><para>sftp-server(8): Add the ability to whitelist
and/or blacklist sftp protocol requests by name.</para></item>
          <item><para>sftp-server(8): Add a sftp "fsync@openssh.com"
to support calling fsync(2) on an open file handle.</para></item>
          <item><para>sshd(8): Add a ssh_config(5) PermitTTY to
disallow TTY allocation, mirroring the longstanding no-pty
authorized_keys option.</para></item>
          <item><para>ssh(1): Add a ssh_config ProxyUseFDPass option
that supports the use of ProxyCommands that establish a connection and
then pass a connected file descriptor back to ssh(1). This allows the
ProxyCommand to exit rather than staying around to transfer
data.</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>ssh(1), sshd(8): Fix potential stack exhaustion
caused by nested certificates.</para></item>
          <item><para>ssh(1): bz#1211: make BindAddress work with
UsePrivilegedPort.</para></item>
          <item><para>sftp(1): bz#2137: fix the progress meter for
resumed transfer.</para></item>
          <item><para>ssh-add(1): bz#2187: do not request smartcard
PIN when removing keys from ssh-agent.</para></item>
          <item><para>sshd(8): bz#2139: fix re-exec fallback when
original sshd binary cannot be executed.</para></item>
          <item><para>ssh-keygen(1): Make relative-specified
certificate expiry times relative to current time and not the validity
start time.</para></item>
          <item><para>sshd(8): bz#2161: fix AuthorizedKeysCommand
inside a Match block.</para></item>
          <item><para>sftp(1): bz#2129: symlinking a file would
incorrectly canonicalise the target path.</para></item>
          <item><para>ssh-agent(1): bz#2175: fix a use-after-free in
the PKCS#11 agent helper executable.</para></item>
          <item><para>sshd(8): Improve logging of sessions to include
the user name, remote host and port, the session type (shell, command,
etc.) and allocated TTY (if any).</para></item>
          <item><para>sshd(8): bz#1297: tell the client (via a debug
message) when their preferred listen address has been overridden by
the server's GatewayPorts setting.</para></item>
          <item><para>sshd(8): bz#2162: include report port in bad
protocol banner message.</para></item>
          <item><para>sftp(1): bz#2163: fix memory leak in error path
in do_readdir().</para></item>
          <item><para>sftp(1): bz#2171: don't leak file descriptor on
error.</para></item>
          <item><para>sshd(8): Include the local address and port in
"Connection from ..." message (only shown at
loglevel>=verbose).</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>Please note that this is the last version of
Portable OpenSSH that will support versions of OpenSSL prior to 0.9.6.
Support (i.e. SSH_OLD_EVP) will be removed following the 6.5p1
release.</para></item>
          <item><para>Portable OpenSSH will attempt compile and link
as a Position Independent Executable on Linux, OS X and OpenBSD on
recent gcc- like compilers. Other platforms and older/other compilers
may request this using the --with-pie configure flag.</para></item>
          <item><para>A number of other toolchain-related hardening
options are used automatically if available, including -ftrapv to
abort on signed integer overflow and options to write-protect dynamic
linking information.  The use of these options may be disabled using
the --without-hardening configure flag.</para></item>
          <item><para>If the toolchain supports it, one of the
-fstack-protector-strong, -fstack-protector-all or -fstack-protector
compilation flag are used to add guards to mitigate attacks based on
stack overflows. The use of these options may be disabled using the
--without-stackprotect configure option.</para></item>
          <item><para>sshd(8): Add support for pre-authentication
sandboxing using the Capsicum API introduced in FreeBSD
10.</para></item>
          <item><para>Switch to a ChaCha20-based arc4random() PRNG for
platforms that do not provide their own.</para></item>
          <item><para>sshd(8): bz#2156: restore Linux oom_adj setting
when handling SIGHUP to maintain behaviour over retart.</para></item>
          <item><para>sshd(8): bz#2032: use local username in
krb5_kuserok check rather than full client name which may be of form
user@REALM.</para></item>
          <item><para>ssh(1), sshd(8): Test for both the presence of
ECC NID numbers in OpenSSL and that they actually work. Fedora (at
least) has NID_secp521r1 that doesn't work.</para></item>
          <item><para>bz#2173: use pkg-config --libs to include
correct -L location for libedit.</para></item>
        </items>
      </change>

      <change from="6.3" to="6.4">
        <item><para>sshd(8): fix a memory corruption problem triggered
during rekeying when an AES-GCM cipher is selected. Full details of
the vulnerability are available at: <ulink
url="http://www.openssh.com/txt/gcmrekey.adv">http://www.openssh.com/txt/gcmrekey.adv</ulink></para></item>
      </change>

      <change from="6.2" to="6.3">
        <items name="Features">
          <item><para>sshd(8): add ssh-agent(1) support to sshd(8);
allows encrypted hostkeys, or hostkeys on smartcards.</para></item>
          <item><para>ssh(1)/sshd(8): allow optional time-based
rekeying via a second argument to the existing RekeyLimit option.
RekeyLimit is now supported in sshd_config as well as on the
client.</para></item>
          <item><para>sshd(8): standardise logging of information
during user authentication.</para>
          <para>The presented key/cert and the remote username (if
available) is now logged in the authentication success/failure message
on the same log line as the local username, remote host/port and
protocol in use. Certificates contents and the key fingerprint of the
signing CA are logged too.</para>
          <para>Including all relevant information on a single line
simplifies log analysis as it is no longer necessary to relate
information scattered across multiple log entries.</para></item>
          <item><para>ssh(1): add the ability to query which ciphers,
MAC algorithms, key types and key exchange methods are supported in
the binary.</para></item>
          <item><para>ssh(1): support ProxyCommand=- to allow support
cases where stdin and stdout already point to the proxy.</para></item>
          <item><para>ssh(1): allow IdentityFile=none</para></item>
          <item><para>ssh(1)/sshd(8): add -E option to ssh and sshd to
append debugging logs to a specified file instead of stderr or
syslog.</para></item>
          <item><para>sftp(1): add support for resuming partial
downloads using the "reget" command and on the sftp commandline or on
the "get" commandline using the "-a" (append) option.</para></item>
          <item><para>ssh(1): add an "IgnoreUnknown" configuration
option to selectively suppress errors arising from unknown
configuration directives.</para></item>
          <item><para>sshd(8): add support for submethods to be
appended to required authentication methods listed via
AuthenticationMethods.</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>sshd(8): fix refusal to accept certificate if a
key of a different type to the CA key appeared in authorized_keys
before the CA key.</para></item>
          <item><para>ssh(1)/ssh-agent(1)/sshd(8): Use a monotonic
time source for timers so that things like keepalives and rekeying
will work properly over clock steps.</para></item>
          <item><para>sftp(1): update progressmeter when data is
acknowledged, not when it's sent. bz#2108</para></item>
          <item><para>ssh(1)/ssh-keygen(1): improve error messages
when the current user does not exist in /etc/passwd;
bz#2125</para></item>
          <item><para>ssh(1): reset the order in which public keys are
tried after partial authentication success.</para></item>
          <item><para>ssh-agent(1): clean up socket files after SIGINT
when in debug mode; bz#2120</para></item>
          <item><para>ssh(1) and others: avoid confusing error
messages in the case of broken system resolver configurations;
bz#2122</para></item>
          <item><para>ssh(1): set TCP nodelay for connections started
with -N; bz#2124</para></item>
          <item><para>ssh(1): correct manual for permission
requirements on ~/.ssh/config; bz#2078</para></item>
          <item><para>ssh(1): fix ControlPersist timeout not
triggering in cases where TCP connections have hung.
bz#1917</para></item>
          <item><para>ssh(1): properly deatch a ControlPersist master
from its controlling terminal.</para></item>
          <item><para>sftp(1): avoid crashes in libedit when it has
been compiled with multi- byte character support.
bz#1990</para></item>
          <item><para>sshd(8): when running sshd -D, close stderr
unless we have explicitly requested logging to stderr.
bz#1976,</para></item>
          <item><para>ssh(1): fix incomplete bzero;
bz#2100</para></item>
          <item><para>sshd(8): log and error and exit if
ChrootDirectory is specified and running without root
privileges.</para></item>
          <item><para>Many improvements to the regression test suite.
In particular log files are now saved from ssh and sshd after
failures.</para></item>
          <item><para>Fix a number of memory leaks. bz#1967 bz#2096
and others</para></item>
          <item><para>sshd(8): fix public key authentication when a
:style is appended to the requested username.</para></item>
          <item><para>ssh(1): do not fatally exit when attempting to
cleanup multiplexing- created channels that are incompletely opened.
bz#2079</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>Major overhaul of
contrib/cygwin/README</para></item>
          <item><para>Fix unaligned accesses in umac.c for
strict-alignment architectures. bz#2101</para></item>
          <item><para>Enable -Wsizeof-pointer-memaccess if the
compiler supports it. bz#2100</para></item>
          <item><para>Fix broken incorrect commandline reporting
errors. bz#1448</para></item>
          <item><para>Only include SHA256 and ECC-based key exchange
methods if libcrypto has the required support.</para></item>
          <item><para>Fix crash in SOCKS5 dynamic forwarding code on
strict-alignment architectures.</para></item>
          <item><para>A number of portability fixes for
Android:</para>
          <unorderedlist>
            <item><para>Don't try to use lastlog on Android;
bz#2111</para></item>
            <item><para>Fall back to using openssl's DES_crypt
function on platorms that don't have a native crypt() function;
bz#2112</para></item>
            <item><para>Test for fd_mask, howmany and NFDBITS rather
than trying to enumerate the plaforms that don't have them.
bz#2085</para></item>
            <item><para>Replace S_IWRITE, which isn't standardized,
with S_IWUSR, which is. bz#2085</para></item>
            <item><para>Add a null implementation of endgrent for
platforms that don't have it (eg Android) bz#2087</para></item>
            <item><para>Support platforms, such as Android, that lack
struct passwd.pw_gecos. bz#2086</para></item>
          </unorderedlist></item>
        </items>
      </change>

      <change from="6.1" to="6.2">
        <items name="Features">
          <item><para>ssh(1)/sshd(8): Added support for AES-GCM
authenticated encryption in SSH protocol 2. The new cipher is
available as aes128-gcm@openssh.com and aes256-gcm@openssh.com. It
uses an identical packet format to the AES-GCM mode specified in RFC
5647, but uses simpler and different selection rules during key
exchange.</para></item>
          <item><para>ssh(1)/sshd(8): Added support for
encrypt-then-mac (EtM) MAC modes for SSH protocol 2. These modes alter
the packet format and compute the MAC over the packet length and
encrypted packet rather than over the plaintext data. These modes are
considered more secure and are used by default when
available.</para></item>
          <item><para>ssh(1)/sshd(8): Added support for the UMAC-128
MAC as "umac-128@openssh.com" and "umac-128-etm@openssh.com". The
latter being an encrypt-then-mac mode.</para></item>
          <item><para>sshd(8): Added support for multiple required
authentication in SSH protocol 2 via an AuthenticationMethods option.
This option lists one or more comma-separated lists of authentication
method names. Successful completion of all the methods in any list is
required for authentication to complete. This allows, for example,
requiring a user having to authenticate via public key or GSSAPI
before they are offered password authentication.</para></item>
          <item><para>sshd(8)/ssh-keygen(1): Added support for Key
Revocation Lists (KRLs), a compact binary format to represent lists of
revoked keys and certificates that take as little as one bit per
certificate when revoking by serial number. KRLs may be generated
using ssh-keygen(1) and are loaded into sshd(8) via the existing
RevokedKeys sshd_config option.</para></item>
          <item><para>ssh(1): IdentitiesOnly now applies to keys
obtained from a PKCS11Provider. This allows control of which keys are
offered from tokens using IdentityFile.</para></item>
          <item><para>sshd(8): sshd_config(5)'s AllowTcpForwarding now
accepts "local" and "remote" in addition to its previous "yes"/"no"
keywords to allow the server to specify whether just local or remote
TCP forwarding is enabled.</para></item>
          <item><para>sshd(8): Added a sshd_config(5) option
AuthorizedKeysCommand to support fetching authorized_keys from a
command in addition to (or instead of) from the filesystem. The
command is run under an account specified by an
AuthorizedKeysCommandUser sshd_config(5) option.</para></item>
          <item><para>sftp-server(8): Now supports a -d option to
allow the starting directory to be something other than the user's
home directory.</para></item>
          <item><para>ssh-keygen(1): Now allows fingerprinting of keys
hosted in PKCS#11 tokens using "ssh-keygen -lD
pkcs11_provider".</para></item>
          <item><para>ssh(1): When SSH protocol 2 only is selected
(the default), ssh(1) now immediately sends its SSH protocol banner to
the server without waiting to receive the server's banner, saving time
when connecting.</para></item>
          <item><para>ssh(1): Added ~v and ~V escape sequences to
raise and lower the logging level respectively.</para></item>
          <item><para>ssh(1): Made the escape command help (~?)
context sensitive so that only commands that will work in the current
session are shown.</para></item>
          <item><para>ssh-keygen(1): When deleting host lines from
known_hosts using "ssh-keygen -R host", ssh-keygen(1) now prints
details of which lines were removed.</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>ssh(1): Force a clean shutdown of ControlMaster
client sessions when the ~. escape sequence is used. This means that
~. should now work in mux clients even if the server is no longer
responding.</para></item>
          <item><para>ssh(1): Correctly detect errors during local TCP
forward setup in multiplexed clients. bz#2055</para></item>
          <item><para>ssh-add(1): Made deleting explicit keys "ssh-add
-d" symmetric with adding keys with respect to certificates. It now
tries to delete the corresponding certificate and respects the -k
option to allow deleting of the key only.</para></item>
          <item><para>sftp(1): Fix a number of parsing and
command-editing bugs, including bz#1956</para></item>
          <item><para>ssh(1): When muxmaster is run with -N, ensured
that it shuts down gracefully when a client sends it "-O stop" rather
than hanging around. bz#1985</para></item>
          <item><para>ssh-keygen(1): When screening moduli candidates,
append to the file rather than overwriting to allow resumption.
bz#1957</para></item>
          <item><para>ssh(1): Record "Received disconnect" messages at
ERROR rather than INFO priority. bz#2057.</para></item>
          <item><para>ssh(1): Loudly warn if explicitly-provided
private key is unreadable. bz#1981</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>sshd(8): The Linux seccomp-filter sandbox is now
supported on ARM platforms where the kernel supports it.</para></item>
          <item><para>sshd(8): The seccomp-filter sandbox will not be
enabled if the system headers support it at compile time, regardless
of whether it can be enabled then. If the run-time system does not
support seccomp-filter, sshd will fall back to the rlimit
pseudo-sandbox.</para></item>
          <item><para>ssh(1): Don't link in the Kerberos libraries.
They aren't necessary on the client, just on sshd(8).
bz#2072</para></item>
          <item><para>Fix GSSAPI linking on Solaris, which uses a
differently-named GSSAPI library. bz#2073</para></item>
          <item><para>Fix compilation on systems with
openssl-1.0.0-fips.</para></item>
          <item><para>Fix a number of errors in the RPM spec
files.</para></item>
        </items>
      </change>

      <change from="6.0" to="6.1">
        <items name="Features">
          <item><para>sshd(8): This release turns on pre-auth
sandboxing sshd by default for new installs, by setting
UsePrivilegeSeparation=sandbox in sshd_config.</para></item>
          <item><para>ssh-keygen(1): Add options to specify starting
line number and number of lines to process when screening moduli
candidates, allowing processing of different parts of a candidate
moduli file in parallel</para></item>
          <item><para>sshd(8): The Match directive now supports
matching on the local (listen) address and port upon which the
incoming connection was received via LocalAddress and LocalPort
clauses.</para></item>
          <item><para>sshd(8): Extend sshd_config Match directive to
allow setting AcceptEnv and {Allow,Deny}{Users,Groups}</para></item>
          <item><para>Add support for RFC6594 SSHFP DNS records for
ECDSA key types. bz#1978</para></item>
          <item><para>ssh-keygen(1): Allow conversion of RSA1 keys to
public PEM and PKCS8</para></item>
          <item><para>sshd(8): Allow the sshd_config PermitOpen
directive to accept "none" as an argument to refuse all
port-forwarding requests.</para></item>
          <item><para>sshd(8): Support "none" as an argument for
AuthorizedPrincipalsFile</para></item>
          <item><para>ssh-keyscan(1): Look for ECDSA keys by default.
bz#1971</para></item>
          <item><para>sshd(8): Add "VersionAddendum" to sshd_config to
allow server operators to append some arbitrary text to the server SSH
protocol banner.</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>ssh(1)/sshd(8): Don't spin in accept() in
situations of file descriptor exhaustion. Instead back off for a
while.</para></item>
          <item><para>ssh(1)/sshd(8): Remove hmac-sha2-256-96 and
hmac-sha2-512-96 MACs as they were removed from the specification.
bz#2023,</para></item>
          <item><para>sshd(8): Handle long comments in config files
better. bz#2025</para></item>
          <item><para>ssh(1): Delay setting tty_flag so RequestTTY
options are correctly picked up. bz#1995</para></item>
          <item><para>sshd(8): Fix handling of /etc/nologin
incorrectly being applied to root on platforms that use
login_cap.</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>sshd(8): Allow sshd pre-auth sandboxing to
fall-back to the rlimit sandbox from the Linux SECCOMP filter sandbox
when the latter is not available in the kernel.</para></item>
          <item><para>ssh(1): Fix NULL dereference when built with
LDNS and using DNSSEC to retrieve a CNAME SSHFP record.</para></item>
          <item><para>Fix cross-compilation problems related to
pkg-config. bz#1996</para></item>
        </items>
      </change>

      <change from="5.9" to="6.0">
        <items name="Features">
          <item><para>ssh-keygen(1): Add optional checkpoints for
moduli screening</para></item>
          <item><para>ssh-add(1): new -k option to load plain keys
(skipping certificates)</para></item>
          <item><para>sshd(8): Add wildcard support to PermitOpen,
allowing things like "PermitOpen localhost:*".  bz #1857</para></item>
          <item><para>ssh(1): support for cancelling local and remote
port forwards via the multiplex socket. Use ssh -O cancel -L xx:xx:xx
-R yy:yy:yy user@host" to request the cancellation of the specified
forwardings</para></item>
          <item><para>support cancellation of local/dynamic
forwardings from ~C commandline</para></item>
        </items>

        <items name="Bugfixes">
          <item><para>ssh(1): ensure that $DISPLAY contains only valid
characters before using it to extract xauth data so that it can't be
used to play local shell metacharacter games.</para></item>
          <item><para>ssh(1): unbreak remote portforwarding with
dynamic allocated listen ports</para></item>
          <item><para>scp(1): uppress adding '--' to remote
commandlines when the first argument does not start with '-'. saves
breakage on some difficult-to-upgrade embedded/router
platforms</para></item>
          <item><para>ssh(1)/sshd(8): fix typo in IPQoS parsing: there
is no "AF14" class, but there is an "AF21" class</para></item>
          <item><para>ssh(1)/sshd(8): do not permit
SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying</para></item>
          <item><para>ssh(1): skip attempting to create ~/.ssh when -F
is passed</para></item>
          <item><para>sshd(8): unbreak stdio forwarding when
ControlPersist is in use; bz#1943</para></item>
          <item><para>sshd(1): send tty break to pty master instead of
(probably already closed) slave side; bz#1859</para></item>
          <item><para>sftp(1): silence error spam for "ls */foo" in
directory with files; bz#1683</para></item>
          <item><para>Fixed a number of memory and file descriptor
leaks</para></item>
        </items>

        <items name="Portable OpenSSH">
          <item><para>Add a new privilege separation sandbox
implementation for Linux's new seccomp sandbox, automatically enabled
on platforms that support it. (Note: privilege separation sandboxing
is still experimental)</para></item>
          <item><para>Fix compilation problems on FreeBSD, where
libutil contained openpty() but not login().</para></item>
          <item><para>ssh-keygen(1): don't fail in -A on platforms
that don't support ECC</para></item>
          <item><para>Add optional support for LDNS, a BSD licensed
DNS resolver library which supports DNSSEC</para></item>
          <item><para>Relax OpenSSL version check to allow running
OpenSSH binaries on systems with OpenSSL libraries with a newer "fix"
or "patch" level than the binaries were originally compiled on
(previous check only allowed movement within "patch" releases).
bz#1991</para></item>
          <item><para>Fix builds using contributed Redhat spec file.
bz#1992</para></item>
        </items>
      </change>

      <note type="compilation">
        <para>GSSAPI support is available through the Kerberos library
on AIX, Redhat Enterprise Linux, and Solaris</para>

        <para><command>/opt/local/bin</command>,
<command>/opt/local/sbin</command>, <command>/usr/local/bin</command>,
and <command>/usr/local/sbin</command> are path components of the
default SSHD path. This is done for legacy reasons for systems that
use to use these two paths. They will be removed in a future OpenSSH
version.</para>
      </note>

      <note type="installation">
        <para>A new "<command>sshd</command>" user and
"<command>sshd</command>" group must be created for privilege
separation to work. The non-privileged sshd daemon chroots to
<command>&PRIVSEPDIR;</command> and runs as the
<command>sshd</command> user.</para>

        <para>PAM is disabled by default. To enable PAM, add
"<command>UsePAM yes</command>" to the sshd configuration file.</para>

        <para>The following files have been marked as configuration
files in <command>&SYSCONFDIR;</command>:
<command>shosts.equiv</command>, <command>ssh_config</command>,
<command>ssh_host_dsa_key</command>,
<command>ssh_host_dsa_key.pub</command>,
<command>ssh_host_key</command>, <command>ssh_host_key.pub</command>,
<command>ssh_host_rsa_key</command>,
<command>ssh_host_rsa_key.pub</command>,
<command>ssh_known_hosts</command>, <command>ssh_prng_cmds</command>,
and <command>sshd_config</command>. Of these, all have been marked as
upgradable except for <command>ssh_prng_cmds</command>. If upgrading
from a previous release of OpenSSH, the old versions will be copied in
place of the new though a backup of the new files will exist to assist
with upgrading.</para>

        <para>For every host you wish to secure by running OpenSSH
(sshd), a host key must be generated. This is done with ssh-keygen.
The following commands will create a RSA public/private host keypair
and a DSA public/private host keypair:</para>
        <screen>
$ ssh-keygen -t rsa1 -f &SYSCONFDIR;/ssh_host_key -N ""
$ ssh-keygen -t dsa -f &SYSCONFDIR;/ssh_host_dsa_key -N ""
$ ssh-keygen -t rsa -f &SYSCONFDIR;/ssh_host_rsa_key -N ""
$ ssh-keygen -t ed25519 -f &SYSCONFDIR;/ssh_host_ed25519_key -N ""
        </screen>

        <para>The startup script will execute these commands
automatically if using the default configuration.</para>

        <para>Because HP-UX 11.11 does not have a
<command>/dev/random</command> device (or equivalent), OpenSSH has
been compiled to gather entropy from the PRNG daemon. Therefore, the
OpenSSH package has a dependency on the PRNGD runtime package.
However, the PRNGD configuration package must be loaded manually if
"out of the box" configuration is required. The PRNGD configuration
package creates startup scripts in the system
<command>/etc/init.d</command> or <command>/sbin/init.d</command>
directory to start the prngd daemon which is required for
communication by OpenSSH.</para>
      </note>

      <platform name="AIX">
        <para>When connecting to an AIX host, the default search path
is:</para>
        <screen>
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin
        </screen>

        <para>This is defined in <command>/etc/environment</command>.
Because of this, scp will fail. For scp to work to an AIX host, add
<command>${SB_INSTALL_PREFIX}/bin</command> to <command>PATH</command>
in <command>/etc/environment</command> or add the binary common path
prefix. The latter is the recommended method.</para>
      </platform>
    </notes>
  </program>
</programs>
