summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/.git-dpm8
-rw-r--r--debian/.gitignore17
-rw-r--r--debian/NEWS195
-rw-r--r--debian/README.Debian254
-rwxr-xr-xdebian/adjust-openssl-dependencies39
-rwxr-xr-xdebian/agent-launch23
-rw-r--r--debian/changelog5117
-rw-r--r--debian/clean2
-rw-r--r--debian/compat1
-rw-r--r--debian/control214
-rw-r--r--debian/copyright247
-rw-r--r--debian/faq.html1187
-rw-r--r--debian/gnome-ssh-askpass.151
-rw-r--r--debian/keygen-test/Makefile12
-rw-r--r--debian/keygen-test/getpid.c39
-rwxr-xr-xdebian/keygen-test/keygen-test12
-rw-r--r--debian/openssh-client-udeb.install3
-rw-r--r--debian/openssh-client.apport32
-rw-r--r--debian/openssh-client.docs6
-rwxr-xr-xdebian/openssh-client.install36
-rw-r--r--debian/openssh-client.links4
-rw-r--r--debian/openssh-client.lintian-overrides1
-rw-r--r--debian/openssh-client.manpages2
-rw-r--r--debian/openssh-client.postinst45
-rw-r--r--debian/openssh-client.postrm22
-rw-r--r--debian/openssh-client.prerm39
-rw-r--r--debian/openssh-server-udeb.dirs1
-rw-r--r--debian/openssh-server-udeb.install2
-rw-r--r--debian/openssh-server.apport28
-rw-r--r--debian/openssh-server.config46
-rw-r--r--debian/openssh-server.examples1
-rw-r--r--debian/openssh-server.if-up42
-rwxr-xr-xdebian/openssh-server.install19
-rw-r--r--debian/openssh-server.links0
-rw-r--r--debian/openssh-server.lintian-overrides1
-rw-r--r--debian/openssh-server.maintscript2
-rw-r--r--debian/openssh-server.postinst157
-rw-r--r--debian/openssh-server.postrm35
-rw-r--r--debian/openssh-server.preinst18
-rw-r--r--debian/openssh-server.ssh.default5
-rw-r--r--debian/openssh-server.ssh.init162
l---------debian/openssh-server.ssh.service1
-rw-r--r--debian/openssh-server.sshd.pam.in55
-rw-r--r--debian/openssh-server.templates23
-rw-r--r--debian/openssh-server.ucf-md5sum48
-rw-r--r--debian/openssh-server.ufw.profile4
-rw-r--r--debian/openssh-sftp-server.install2
-rw-r--r--debian/openssh-sftp-server.links1
-rw-r--r--debian/patches/authorized-keys-man-symlink.patch26
-rw-r--r--debian/patches/debian-banner.patch111
-rw-r--r--debian/patches/debian-config.patch238
-rw-r--r--debian/patches/dnssec-sshfp.patch94
-rw-r--r--debian/patches/doc-hash-tab-completion.patch28
-rw-r--r--debian/patches/gnome-ssh-askpass2-icon.patch26
-rw-r--r--debian/patches/gssapi.patch3300
-rw-r--r--debian/patches/keepalive-extensions.patch134
-rw-r--r--debian/patches/mention-ssh-keygen-on-keychange.patch44
-rw-r--r--debian/patches/no-openssl-version-status.patch62
-rw-r--r--debian/patches/openbsd-docs.patch148
-rw-r--r--debian/patches/package-versioning.patch61
-rw-r--r--debian/patches/restore-authorized_keys2.patch35
-rw-r--r--debian/patches/restore-tcp-wrappers.patch172
-rw-r--r--debian/patches/scp-quoting.patch41
-rw-r--r--debian/patches/seccomp-getuid-geteuid.patch44
-rw-r--r--debian/patches/seccomp-s390-flock-ipc.patch47
-rw-r--r--debian/patches/seccomp-s390-ioctl-ep11-crypto.patch33
-rw-r--r--debian/patches/selinux-role.patch473
-rw-r--r--debian/patches/series26
-rw-r--r--debian/patches/shell-path.patch39
-rw-r--r--debian/patches/ssh-agent-setgid.patch40
-rw-r--r--debian/patches/ssh-argv0.patch31
-rw-r--r--debian/patches/ssh-vulnkey-compat.patch42
-rw-r--r--debian/patches/syslog-level-silent.patch47
-rw-r--r--debian/patches/systemd-readiness.patch84
-rw-r--r--debian/patches/user-group-modes.patch210
-rw-r--r--debian/po/POTFILES.in1
-rw-r--r--debian/po/cs.po55
-rw-r--r--debian/po/da.po55
-rw-r--r--debian/po/de.po61
-rw-r--r--debian/po/es.po80
-rw-r--r--debian/po/fr.po59
-rw-r--r--debian/po/it.po58
-rw-r--r--debian/po/ja.po55
-rw-r--r--debian/po/nl.po60
-rw-r--r--debian/po/pt.po59
-rw-r--r--debian/po/pt_BR.po57
-rw-r--r--debian/po/ru.po57
-rw-r--r--debian/po/sv.po58
-rw-r--r--debian/po/templates.pot46
-rw-r--r--debian/po/tr.po58
-rwxr-xr-xdebian/rules246
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/include-binaries1
-rw-r--r--debian/source/lintian-overrides2
-rw-r--r--debian/ssh-argv031
-rw-r--r--debian/ssh-argv0.164
-rw-r--r--debian/ssh-askpass-gnome.desktop12
-rw-r--r--debian/ssh-askpass-gnome.examples1
-rwxr-xr-xdebian/ssh-askpass-gnome.install3
-rw-r--r--debian/ssh-askpass-gnome.manpages1
-rw-r--r--debian/ssh-askpass-gnome.pngbin0 -> 6949 bytes
-rw-r--r--debian/ssh-askpass-gnome.postinst48
-rw-r--r--debian/ssh-askpass-gnome.prerm39
-rw-r--r--debian/ssh.lintian-overrides1
-rw-r--r--debian/ssh.maintscript1
-rw-r--r--debian/systemd/ssh-agent.override1
-rw-r--r--debian/systemd/ssh-agent.service10
-rwxr-xr-xdebian/systemd/ssh-session-cleanup11
-rw-r--r--debian/systemd/ssh-session-cleanup.service13
-rw-r--r--debian/systemd/ssh.service21
-rw-r--r--debian/systemd/ssh.socket12
-rw-r--r--debian/systemd/ssh@.service10
-rw-r--r--debian/tests/control13
-rwxr-xr-xdebian/tests/regress97
-rw-r--r--debian/upstream/signing-key.asc44
-rw-r--r--debian/watch3
116 files changed, 15402 insertions, 0 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm
new file mode 100644
index 000000000..3881f839b
--- /dev/null
+++ b/debian/.git-dpm
@@ -0,0 +1,8 @@
1# see git-dpm(1) from git-dpm package
2ea67bc97339c9a507343e4a1f5fb867f678fbe1d
3ea67bc97339c9a507343e4a1f5fb867f678fbe1d
4ed6ae9c1a014a08ff5db3d768f01f2e427eeb476
5ed6ae9c1a014a08ff5db3d768f01f2e427eeb476
6openssh_7.7p1.orig.tar.gz
7446fe9ed171f289f0d62197dffdbfdaaf21c49f2
81536900
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 000000000..988323b00
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,17 @@
1/*.debhelper*
2/*substvars
3/build-deb
4/build-udeb
5/files
6/keygen-test/key1
7/keygen-test/key1.pub
8/keygen-test/key2
9/keygen-test/key2.pub
10/openssh-client
11/openssh-client-udeb
12/openssh-server
13/openssh-server-udeb
14/ssh
15/ssh-askpass-gnome
16/ssh-krb5
17/tmp
diff --git a/debian/NEWS b/debian/NEWS
new file mode 100644
index 000000000..08e596552
--- /dev/null
+++ b/debian/NEWS
@@ -0,0 +1,195 @@
1openssh (1:7.6p1-1) unstable; urgency=medium
2
3 OpenSSH 7.6 includes a number of changes that may affect existing
4 configurations:
5
6 * ssh(1): Delete SSH protocol version 1 support, associated configuration
7 options and documentation.
8 * ssh(1)/sshd(8): Remove support for the hmac-ripemd160 MAC.
9 * ssh(1)/sshd(8): Remove support for the arcfour, blowfish and CAST
10 ciphers.
11 * Refuse RSA keys <1024 bits in length and improve reporting for keys
12 that do not meet this requirement.
13 * ssh(1): Do not offer CBC ciphers by default.
14
15 -- Colin Watson <cjwatson@debian.org> Fri, 06 Oct 2017 12:36:48 +0100
16
17openssh (1:7.5p1-1) experimental; urgency=medium
18
19 OpenSSH 7.5 includes a number of changes that may affect existing
20 configurations:
21
22 * This release deprecates the sshd_config UsePrivilegeSeparation option,
23 thereby making privilege separation mandatory.
24
25 * The format of several log messages emitted by the packet code has
26 changed to include additional information about the user and their
27 authentication state. Software that monitors ssh/sshd logs may need to
28 account for these changes. For example:
29
30 Connection closed by user x 1.1.1.1 port 1234 [preauth]
31 Connection closed by authenticating user x 10.1.1.1 port 1234 [preauth]
32 Connection closed by invalid user x 1.1.1.1 port 1234 [preauth]
33
34 Affected messages include connection closure, timeout, remote
35 disconnection, negotiation failure and some other fatal messages
36 generated by the packet code.
37
38 -- Colin Watson <cjwatson@debian.org> Sun, 02 Apr 2017 02:58:01 +0100
39
40openssh (1:7.4p1-7) unstable; urgency=medium
41
42 This version restores the default for AuthorizedKeysFile to search both
43 ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2, as was the case in
44 Debian configurations before 1:7.4p1-1. Upstream intends to phase out
45 searching ~/.ssh/authorized_keys2 by default, so you should ensure that
46 you are only using ~/.ssh/authorized_keys, at least for critical
47 administrative access; do not assume that the current default will remain
48 in place forever.
49
50 -- Colin Watson <cjwatson@debian.org> Sun, 05 Mar 2017 02:12:42 +0000
51
52openssh (1:7.4p1-1) unstable; urgency=medium
53
54 OpenSSH 7.4 includes a number of changes that may affect existing
55 configurations:
56
57 * ssh(1): Remove 3des-cbc from the client's default proposal. 64-bit
58 block ciphers are not safe in 2016 and we don't want to wait until
59 attacks like SWEET32 are extended to SSH. As 3des-cbc was the only
60 mandatory cipher in the SSH RFCs, this may cause problems connecting to
61 older devices using the default configuration, but it's highly likely
62 that such devices already need explicit configuration for key exchange
63 and hostkey algorithms already anyway.
64 * sshd(8): Remove support for pre-authentication compression. Doing
65 compression early in the protocol probably seemed reasonable in the
66 1990s, but today it's clearly a bad idea in terms of both cryptography
67 (cf. multiple compression oracle attacks in TLS) and attack surface.
68 Pre-auth compression support has been disabled by default for >10
69 years. Support remains in the client.
70 * ssh-agent will refuse to load PKCS#11 modules outside a whitelist of
71 trusted paths by default. The path whitelist may be specified at
72 run-time.
73 * sshd(8): When a forced-command appears in both a certificate and an
74 authorized keys/principals command= restriction, sshd will now refuse
75 to accept the certificate unless they are identical. The previous
76 (documented) behaviour of having the certificate forced-command
77 override the other could be a bit confusing and error-prone.
78 * sshd(8): Remove the UseLogin configuration directive and support for
79 having /bin/login manage login sessions.
80
81 The unprivileged sshd process that deals with pre-authentication network
82 traffic is now subject to additional sandboxing restrictions by default:
83 that is, the default sshd_config now sets UsePrivilegeSeparation to
84 "sandbox" rather than "yes". This has been the case upstream for a while,
85 but until now the Debian configuration diverged unnecessarily.
86
87 -- Colin Watson <cjwatson@debian.org> Tue, 27 Dec 2016 18:01:46 +0000
88
89openssh (1:7.2p1-1) unstable; urgency=medium
90
91 OpenSSH 7.2 disables a number of legacy cryptographic algorithms by
92 default in ssh:
93
94 * Several ciphers blowfish-cbc, cast128-cbc, all arcfour variants and the
95 rijndael-cbc aliases for AES.
96 * MD5-based and truncated HMAC algorithms.
97
98 These algorithms are already disabled by default in sshd.
99
100 -- Colin Watson <cjwatson@debian.org> Tue, 08 Mar 2016 11:47:20 +0000
101
102openssh (1:7.1p1-2) unstable; urgency=medium
103
104 OpenSSH 7.0 disables several pieces of weak, legacy, and/or unsafe
105 cryptography.
106
107 * Support for the legacy SSH version 1 protocol is disabled by default at
108 compile time. Note that this also means that the Cipher keyword in
109 ssh_config(5) is effectively no longer usable; use Ciphers instead for
110 protocol 2. The openssh-client-ssh1 package includes "ssh1", "scp1",
111 and "ssh-keygen1" binaries which you can use if you have no alternative
112 way to connect to an outdated SSH1-only server; please contact the
113 server administrator or system vendor in such cases and ask them to
114 upgrade.
115 * Support for the 1024-bit diffie-hellman-group1-sha1 key exchange is
116 disabled by default at run-time. It may be re-enabled using the
117 instructions at http://www.openssh.com/legacy.html
118 * Support for ssh-dss, ssh-dss-cert-* host and user keys is disabled by
119 default at run-time. These may be re-enabled using the instructions at
120 http://www.openssh.com/legacy.html
121 * Support for the legacy v00 cert format has been removed.
122
123 Future releases will retire more legacy cryptography, including:
124
125 * Refusing all RSA keys smaller than 1024 bits (the current minimum is
126 768 bits).
127 * Several ciphers will be disabled by default: blowfish-cbc, cast128-cbc,
128 all arcfour variants, and the rijndael-cbc aliases for AES.
129 * MD5-based HMAC algorithms will be disabled by default.
130
131 -- Colin Watson <cjwatson@debian.org> Tue, 08 Dec 2015 15:33:08 +0000
132
133openssh (1:6.9p1-1) unstable; urgency=medium
134
135 UseDNS now defaults to 'no'. Configurations that match against the client
136 host name (via sshd_config or authorized_keys) may need to re-enable it or
137 convert to matching against addresses.
138
139 -- Colin Watson <cjwatson@debian.org> Thu, 20 Aug 2015 10:38:58 +0100
140
141openssh (1:6.7p1-5) unstable; urgency=medium
142
143 openssh-server 1:6.7p1-4 changed the default setting of AcceptEnv to list
144 a number of specific LC_FOO variables rather than the wildcard LC_*. I
145 have since been persuaded that this was a bad idea and have reverted it,
146 but it is difficult to automatically undo the change to
147 /etc/ssh/sshd_config without compounding the problem (that of modifying
148 configuration that some users did not want to be modified) further. Most
149 users who upgraded via version 1:6.7p1-4 should restore the previous value
150 of "AcceptEnv LANG LC_*" in /etc/ssh/sshd_config.
151
152 -- Colin Watson <cjwatson@debian.org> Sun, 22 Mar 2015 23:09:32 +0000
153
154openssh (1:5.4p1-2) unstable; urgency=low
155
156 Smartcard support is now available using PKCS#11 tokens. If you were
157 previously using an unofficial build of Debian's OpenSSH package with
158 OpenSC-based smartcard support added, then note that commands like
159 'ssh-add -s 0' will no longer work; you need to use 'ssh-add -s
160 /usr/lib/opensc-pkcs11.so' instead.
161
162 -- Colin Watson <cjwatson@debian.org> Sat, 10 Apr 2010 01:08:59 +0100
163
164openssh (1:3.8.1p1-9) experimental; urgency=low
165
166 The ssh package has been split into openssh-client and openssh-server. If
167 you had previously requested that the sshd server should not be run, then
168 that request will still be honoured. However, the recommended approach is
169 now to remove the openssh-server package if you do not want to run sshd.
170 You can remove the old /etc/ssh/sshd_not_to_be_run marker file after doing
171 that.
172
173 -- Colin Watson <cjwatson@debian.org> Mon, 2 Aug 2004 20:48:54 +0100
174
175openssh (1:3.5p1-1) unstable; urgency=low
176
177 This version of OpenSSH disables the environment option for public keys by
178 default, in order to avoid certain attacks (for example, LD_PRELOAD). If
179 you are using this option in an authorized_keys file, beware that the keys
180 in question will no longer work until the option is removed.
181
182 To re-enable this option, set "PermitUserEnvironment yes" in
183 /etc/ssh/sshd_config after the upgrade is complete, taking note of the
184 warning in the sshd_config(5) manual page.
185
186 -- Colin Watson <cjwatson@debian.org> Sat, 26 Oct 2002 19:41:51 +0100
187
188openssh (1:3.0.1p1-1) unstable; urgency=high
189
190 As of version 3, OpenSSH no longer uses separate files for ssh1 and ssh2
191 keys. This means the authorized_keys2 and known_hosts2 files are no longer
192 needed. They will still be read in order to maintain backward
193 compatibility.
194
195 -- Matthew Vernon <matthew@debian.org> Thu, 28 Nov 2001 17:43:01 +0000
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 000000000..58a5741b0
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,254 @@
1OpenSSH for Debian
2------------------
3
4UPGRADE ISSUES
5==============
6
7PermitRootLogin
8---------------
9
10As of 1:6.6p1-1, new installations will be set to "PermitRootLogin
11without-password" (or the synonymous "PermitRootLogin prohibit-password" as
12of 1:7.1p1-1). This disables password authentication for root, foiling
13password dictionary attacks on the root user. Some sites may wish to use
14the stronger "PermitRootLogin forced-commands-only" or "PermitRootLogin no",
15but note that "PermitRootLogin no" will break setups that SSH to root with a
16forced command to take full-system backups. You can use PermitRootLogin in
17a Match block if you want finer-grained control here.
18
19For many years Debian's OpenSSH packaging used "PermitRootLogin yes", in
20line with upstream. To avoid breaking local setups, this is still true for
21installations upgraded from before 1:6.6p1-1. If you wish to change this,
22you should edit /etc/ssh/sshd_config, change it manually, and run "service
23ssh restart" as root.
24
25Disabling PermitRootLogin means that an attacker possessing credentials for
26the root account (any credentials in the case of "yes", or private key
27material in the case of "prohibit-password") must compromise a normal user
28account rather than being able to SSH directly to root. Be careful to avoid
29a false illusion of security if you change this setting; any account you
30escalate to root from should be considered equivalent to root for the
31purposes of security against external attack. You might for example disable
32it if you know you will only ever log in as root from the physical console.
33
34Since the root account does not generally have non-password credentials
35unless you explicitly install an SSH public key in its
36~/.ssh/authorized_keys, which you presumably only do if you want to SSH to
37it, "prohibit-password" should be a reasonable default for most sites.
38
39As of OpenSSH 7.0, this is the upstream default.
40
41For further discussion, see:
42
43 https://bugs.debian.org/298138
44 https://bugzilla.mindrot.org/show_bug.cgi?id=2164
45
46X11 Forwarding
47--------------
48
49ssh's default for ForwardX11 has been changed to ``no'' because it has
50been pointed out that logging into remote systems administered by
51untrusted people is likely to open you up to X11 attacks, so you
52should have to actively decide that you trust the remote machine's
53root, before enabling X11. I strongly recommend that you do this on a
54machine-by-machine basis, rather than just enabling it in the default
55host settings.
56
57In order for X11 forwarding to work, you need to install xauth on the
58server. In Debian this is in the xbase-clients package.
59
60As of OpenSSH 3.1, the remote $DISPLAY uses localhost by default to reduce
61the security risks of X11 forwarding. Look up X11UseLocalhost in
62sshd_config(8) if this is a problem.
63
64OpenSSH 3.8 invented ForwardX11Trusted, which when set to no causes the
65ssh client to create an untrusted X cookie so that attacks on the
66forwarded X11 connection can't become attacks on X clients on the remote
67machine. However, this has some problems in implementation - notably a
68very short timeout of the untrusted cookie - breaks large numbers of
69existing setups, and generally seems immature. The Debian package
70therefore sets the default for this option to "yes" (in ssh itself,
71rather than in ssh_config).
72
73Fallback to RSH
74---------------
75
76The default for this setting has been changed from Yes to No, for
77security reasons, and to stop the delay attempting to rsh to machines
78that don't offer the service. Simply switch it back on in either
79/etc/ssh/ssh_config or ~/.ssh/config for those machines that you need
80it for.
81
82Setgid ssh-agent and environment variables
83------------------------------------------
84
85As of version 1:3.5p1-1, ssh-agent is installed setgid to prevent ptrace()
86attacks retrieving private key material. This has the side-effect of causing
87glibc to remove certain environment variables which might have security
88implications for set-id programs, including LD_PRELOAD, LD_LIBRARY_PATH, and
89TMPDIR.
90
91If you need to set any of these environment variables, you will need to do
92so in the program exec()ed by ssh-agent. This may involve creating a small
93wrapper script.
94
95Symlink Hostname invocation
96---------------------------
97
98This version of ssh no longer includes support for invoking ssh with the
99hostname as the name of the file run. People wanting this support should
100use the ssh-argv0 script.
101
102=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
103
104OTHER ISSUES
105============
106
107Authorization Forwarding
108------------------------
109
110Similarly, root on a remote server could make use of your ssh-agent
111(while you're logged into their machine) to obtain access to machines
112which trust your keys. This feature is therefore disabled by default.
113You should only re-enable it for those hosts (in your ~/.ssh/config or
114/etc/ssh/ssh_config) where you are confident that the remote machine
115is not a threat.
116
117Problems logging in with RSA authentication
118-------------------------------------------
119
120If you have trouble logging in with RSA authentication then the
121problem is probably caused by the fact that you have your home
122directory writable by group, as well as user (this is the default on
123Debian systems).
124
125Depending upon other settings on your system (i.e. other users being
126in your group) this could open a security hole, so you will need to
127make your home directory writable only by yourself. Run this command,
128as yourself:
129
130 chmod g-w ~/
131
132to remove group write permissions. If you use ssh-copy-id to install your
133keys, it does this for you.
134
135-L option of ssh nonfree
136------------------------
137
138non-free ssh supported the usage of the option -L to use a non privileged
139port for scp. This option will not be supported by scp from openssh.
140
141Please use instead scp -o "UsePrivilegedPort=no" as documented in the
142manpage to scp itself.
143
144Problem logging in because of TCP-Wrappers
145------------------------------------------
146
147ssh is compiled with support for tcp-wrappers. So if you can no longer
148log into your system, please check that /etc/hosts.allow and /etc/hosts.deny
149are configured so that ssh is not blocked.
150
151Kerberos support
152----------------
153
154ssh is now compiled with Kerberos support. Unfortunately, privilege
155separation is incompatible with parts of Kerberos support for protocol 2;
156you may need to run kinit after logging in.
157
158Interoperability between scp and the ssh.com SSH server
159-------------------------------------------------------
160
161In version 2 and greater of the commercial SSH server produced by SSH
162Communications Security, scp was changed to use SFTP (SSH2's file transfer
163protocol) instead of the traditional rcp-over-ssh, thereby breaking
164compatibility. The OpenSSH developers regard this as a bug in the ssh.com
165server, and do not currently intend to change OpenSSH's scp to match.
166
167Workarounds for this problem are to install scp1 on the server (scp2 will
168fall back to it), to use sftp, or to use some other transfer mechanism such
169as rsync-over-ssh or tar-over-ssh.
170
171Running sshd from inittab
172-------------------------
173
174Some people find it useful to run the sshd server from inittab, to make sure
175that it always stays running. To do this, stop sshd ('service ssh stop'),
176add the following line to /etc/inittab, and run 'telinit q':
177
178 ss:2345:respawn:/usr/sbin/sshd -D
179
180If you do this, note that you will need to stop sshd being started in the
181normal way ('update-rc.d ssh disable') and that you will need to restart
182this sshd manually on upgrades.
183
184Per-connection sshd instances with systemd
185------------------------------------------
186
187If you want to reconfigure systemd to listen on port 22 itself and launch an
188instance of sshd for each connection (inetd-style socket activation), then
189you can run:
190
191 systemctl stop ssh.service
192 systemctl start ssh.socket
193
194To make this permanent:
195
196 systemctl disable ssh.service
197 systemctl enable ssh.socket
198
199This may be appropriate in environments where minimal footprint is critical
200(e.g. cloud guests). Be aware that this bypasses MaxStartups, and systemd's
201MaxConnections cannot quite replace this as it cannot distinguish between
202authenticated and unauthenticated connections; see
203https://bugzilla.redhat.com/show_bug.cgi?id=963268 for more discussion.
204
205The provided ssh.socket unit file sets ListenStream=22. If you need to have
206it listen on a different address or port, then you will need to do this as
207follows (modifying ListenStream to match your requirements):
208
209 mkdir -p /etc/systemd/system/ssh.socket.d
210 cat >/etc/systemd/system/ssh.socket.d/listen.conf <<EOF
211 [Socket]
212 ListenStream=2222
213 EOF
214 systemctl daemon-reload
215
216See systemd.socket(5) for details.
217
218Terminating SSH sessions cleanly on shutdown/reboot with systemd
219----------------------------------------------------------------
220
221If you have libpam-systemd >= 230 installed (following openssh-server's
222Recommends) and "UsePAM yes" in sshd_config (the default configuration
223shipped by this package), then SSH sessions will be terminated cleanly when
224the server is shut down or rebooted.
225
226If either of these conditions does not hold, then you may find that SSH
227sessions hang silently when the server is shut down or rebooted. If you do
228not want to use PAM or configure it properly for whatever reason, then you
229can instead copy
230/usr/share/doc/openssh-server/examples/ssh-session-cleanup.service to
231/etc/systemd/system/ and run "systemctl enable ssh-session-cleanup.service".
232
233Non-systemd users may find /usr/lib/openssh/ssh-session-cleanup helpful if
234they have a similar problem, although at present there is no system
235integration for this for anything other than systemd.
236
237SSH protocol 1 server support removed
238-------------------------------------
239
240sshd(8) no longer supports the old SSH protocol 1, so all the configuration
241options related to it are now deprecated and should be removed from
242/etc/ssh/sshd_config. These are:
243
244 KeyRegenerationInterval
245 RSAAuthentication
246 RhostsRSAAuthentication
247 ServerKeyBits
248
249The Protocol option is also no longer needed, although it is silently
250ignored rather than deprecated.
251
252--
253Matthew Vernon <matthew@debian.org>
254Colin Watson <cjwatson@debian.org>
diff --git a/debian/adjust-openssl-dependencies b/debian/adjust-openssl-dependencies
new file mode 100755
index 000000000..cd740a8e1
--- /dev/null
+++ b/debian/adjust-openssl-dependencies
@@ -0,0 +1,39 @@
1#! /bin/sh
2# Attempt to tighten libssl dependencies to match the check in entropy.c.
3# Must be run after dpkg-shlibdeps.
4
5client=debian/openssh-client.substvars
6server=debian/openssh-server.substvars
7
8libssl_version="$(dpkg-query -W libssl1.0-dev 2>/dev/null | cut -f2)"
9if [ -z "$libssl_version" ]; then
10 libssl_version="$(dpkg-query -W libssl-dev 2>/dev/null | cut -f2)"
11fi
12if [ -z "$libssl_version" ]; then
13 echo "Can't find libssl-dev version; leaving dependencies alone."
14 exit 0
15fi
16libssl_version="$(echo "$libssl_version" | sed 's/[a-z-].*//')"
17
18libssl_package="$(sed -n 's/.*[= ]\(libssl[0-9][a-z0-9+.-]*\).*/\1/p' "$client")"
19if [ "$libssl_package" ]; then
20 new_dep="$libssl_package (>= $libssl_version)"
21 sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$client"
22 sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$server"
23fi
24
25client_udeb=debian/openssh-client-udeb.substvars
26server_udeb=debian/openssh-server-udeb.substvars
27
28libcrypto_package="$(sed -n 's/.*[= ]\(libcrypto[0-9][a-z0-9+.-]*\).*/\1/p' "$client_udeb")"
29if [ "$libcrypto_package" ]; then
30 new_dep="$libcrypto_package (>= $libssl_version)"
31 if [ -e "$client_udeb" ]; then
32 sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$client_udeb"
33 fi
34 if [ -e "$server_udeb" ]; then
35 sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$server_udeb"
36 fi
37fi
38
39exit 0
diff --git a/debian/agent-launch b/debian/agent-launch
new file mode 100755
index 000000000..f3cbfaef8
--- /dev/null
+++ b/debian/agent-launch
@@ -0,0 +1,23 @@
1#!/bin/sh
2# helper script for launching ssh-agent, used by systemd unit
3set -e
4
5if [ ! -d "$XDG_RUNTIME_DIR" ]; then
6 echo 'This needs $XDG_RUNTIME_DIR to be set' >&2
7 exit 1
8fi
9
10if [ "$1" = start ]; then
11 if [ -z "$SSH_AUTH_SOCK" ] && grep -s -q '^use-ssh-agent$' /etc/X11/Xsession.options; then
12 S="$XDG_RUNTIME_DIR/openssh_agent"
13 dbus-update-activation-environment --verbose --systemd SSH_AUTH_SOCK=$S SSH_AGENT_LAUNCHER=openssh
14 exec ssh-agent -D -a $S
15 fi
16elif [ "$1" = stop ]; then
17 if [ "$SSH_AGENT_LAUNCHER" = openssh ]; then
18 dbus-update-activation-environment --systemd SSH_AUTH_SOCK=
19 fi
20else
21 echo "Unknown command $1" >&2
22 exit 1
23fi
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000000000..782e67e58
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5117 @@
1openssh (1:7.7p1-2) UNRELEASED; urgency=medium
2
3 * Fix parsing of DebianBanner option (closes: #894730).
4
5 -- Colin Watson <cjwatson@debian.org> Tue, 03 Apr 2018 18:41:26 +0100
6
7openssh (1:7.7p1-1) unstable; urgency=medium
8
9 * New upstream release (https://www.openssh.com/txt/release-7.7):
10 - ssh(1)/sshd(8): Drop compatibility support for some very old SSH
11 implementations, including ssh.com <=2.* and OpenSSH <= 3.*. These
12 versions were all released in or before 2001 and predate the final SSH
13 RFCs. The support in question isn't necessary for RFC-compliant SSH
14 implementations.
15 - Add experimental support for PQC XMSS keys (Extended Hash-Based
16 Signatures).
17 - sshd(8): Add an "rdomain" criterion for the sshd_config Match keyword
18 to allow conditional configuration that depends on which routing
19 domain a connection was received on.
20 - sshd_config(5): Add an optional rdomain qualifier to the ListenAddress
21 directive to allow listening on different routing domains.
22 - sshd(8): Add "expiry-time" option for authorized_keys files to allow
23 for expiring keys.
24 - ssh(1): Add a BindInterface option to allow binding the outgoing
25 connection to an interface's address (basically a more usable
26 BindAddress; closes: #289592).
27 - ssh(1): Expose device allocated for tun/tap forwarding via a new %T
28 expansion for LocalCommand. This allows LocalCommand to be used to
29 prepare the interface.
30 - sshd(8): Expose the device allocated for tun/tap forwarding via a new
31 SSH_TUNNEL environment variable. This allows automatic setup of the
32 interface and surrounding network configuration automatically on the
33 server.
34 - ssh(1)/scp(1)/sftp(1): Add URI support to ssh, sftp and scp, e.g.
35 ssh://user@host or sftp://user@host/path. Additional connection
36 parameters described in draft-ietf-secsh-scp-sftp-ssh-uri-04 are not
37 implemented since the ssh fingerprint format in the draft uses the
38 deprecated MD5 hash with no way to specify any other algorithm.
39 - ssh-keygen(1): Allow certificate validity intervals that specify only
40 a start or stop time (instead of both or neither).
41 - sftp(1): Allow "cd" and "lcd" commands with no explicit path argument.
42 lcd will change to the local user's home directory as usual. cd will
43 change to the starting directory for session (because the protocol
44 offers no way to obtain the remote user's home directory).
45 - sshd(8): When doing a config test with sshd -T, only require the
46 attributes that are actually used in Match criteria rather than (an
47 incomplete list of) all criteria.
48 - ssh(1)/sshd(8): More strictly check signature types during key
49 exchange against what was negotiated. Prevents downgrade of RSA
50 signatures made with SHA-256/512 to SHA-1.
51 - sshd(8): Fix support for client that advertise a protocol version of
52 "1.99" (indicating that they are prepared to accept both SSHv1 and
53 SSHv2). This was broken in OpenSSH 7.6 during the removal of SSHv1
54 support.
55 - ssh(1): Warn when the agent returns a ssh-rsa (SHA1) signature when a
56 rsa-sha2-256/512 signature was requested. This condition is possible
57 when an old or non-OpenSSH agent is in use.
58 - ssh-agent(1): Fix regression introduced in 7.6 that caused ssh-agent
59 to fatally exit if presented an invalid signature request message.
60 - sshd_config(5): Accept yes/no flag options case-insensitively, as has
61 been the case in ssh_config(5) for a long time (LP: #1656557).
62 - ssh(1): Improve error reporting for failures during connection. Under
63 some circumstances misleading errors were being shown.
64 - ssh-keyscan(1): Add -D option to allow printing of results directly in
65 SSHFP format.
66 - ssh(1): Compatibility fix for some servers that erroneously drop the
67 connection when the IUTF8 (RFC8160) option is sent.
68 - scp(1): Disable RemoteCommand and RequestTTY in the ssh session
69 started by scp (sftp was already doing this).
70 - ssh-keygen(1): Refuse to create a certificate with an unusable number
71 of principals.
72 - ssh-keygen(1): Fatally exit if ssh-keygen is unable to write all the
73 public key during key generation. Previously it would silently ignore
74 errors writing the comment and terminating newline.
75 - ssh(1): Do not modify hostname arguments that are addresses by
76 automatically forcing them to lower-case. Instead canonicalise them
77 jo resolve ambiguities (e.g. ::0001 => ::1) before they are matched
78 against known_hosts.
79 - ssh(1): Don't accept junk after "yes" or "no" responses to hostkey
80 prompts.
81 - sftp(1): Have sftp print a warning about shell cleanliness when
82 decoding the first packet fails, which is usually caused by shells
83 polluting stdout of non-interactive startups.
84 - ssh(1)/sshd(8): Switch timers in packet code from using wall-clock
85 time to monotonic time, allowing the packet layer to better function
86 over a clock step and avoiding possible integer overflows during
87 steps.
88 - sshd(8): Correctly detect MIPS ABI in use at configure time. Fixes
89 sandbox violations on some environments.
90 - Build and link with "retpoline" flags when available to mitigate the
91 "branch target injection" style (variant 2) of the Spectre
92 branch-prediction vulnerability.
93
94 -- Colin Watson <cjwatson@debian.org> Tue, 03 Apr 2018 12:40:24 +0100
95
96openssh (1:7.6p1-5) unstable; urgency=medium
97
98 * Explicitly build-depend on pkg-config, rather than implicitly
99 build-depending on it via libgtk-3-dev (thanks, Aurelien Jarno; closes:
100 #894558).
101
102 -- Colin Watson <cjwatson@debian.org> Sun, 01 Apr 2018 21:37:19 +0100
103
104openssh (1:7.6p1-4) unstable; urgency=medium
105
106 * Move VCS to salsa.debian.org.
107 * Add a preseeding-only openssh-server/password-authentication debconf
108 template that can be used to disable password authentication (closes:
109 #878945).
110
111 -- Colin Watson <cjwatson@debian.org> Sat, 10 Feb 2018 02:31:46 +0000
112
113openssh (1:7.6p1-3) unstable; urgency=medium
114
115 [ Colin Watson ]
116 * Remove the decade-old ssh-krb5 transitional package; upgrades of
117 openssh-server will preserve existing configuration, and new
118 installations should just enable GSSAPIAuthentication and
119 GSSAPIKeyExchange in sshd_config (closes: #878626).
120 * Support the "noudeb" build profile.
121 * Fix putty-transfer regression test.
122
123 [ Anders Kaseorg ]
124 * debian/systemd/ssh-agent.service: Add missing dbus dependency.
125
126 [ Jason Duerstock ]
127 * Add a "pkg.openssh.nognome" build profile, which disables building the
128 ssh-askpass-gnome binary package and avoids the build-dependency on
129 libgtk-3-dev (closes: #883819).
130
131 -- Colin Watson <cjwatson@debian.org> Tue, 16 Jan 2018 17:41:08 +0000
132
133openssh (1:7.6p1-2) unstable; urgency=medium
134
135 * Apply upstream patch to fix PermitOpen argument handling.
136
137 -- Colin Watson <cjwatson@debian.org> Sat, 07 Oct 2017 13:44:13 +0100
138
139openssh (1:7.6p1-1) unstable; urgency=medium
140
141 * New upstream release (https://www.openssh.com/txt/release-7.6):
142 - CVE-2017-15906: sftp-server(8): In read-only mode, sftp-server was
143 incorrectly permitting creation of zero-length files. Reported by
144 Michal Zalewski.
145 - ssh(1): Delete SSH protocol version 1 support, associated
146 configuration options and documentation (LP: #1584321).
147 - ssh(1)/sshd(8): Remove support for the hmac-ripemd160 MAC.
148 - ssh(1)/sshd(8): Remove support for the arcfour, blowfish and CAST
149 ciphers.
150 - Refuse RSA keys <1024 bits in length and improve reporting for keys
151 that do not meet this requirement.
152 - ssh(1): Do not offer CBC ciphers by default.
153 - ssh(1): Add RemoteCommand option to specify a command in the ssh
154 config file instead of giving it on the client's command line. This
155 allows the configuration file to specify the command that will be
156 executed on the remote host.
157 - sshd(8): Add ExposeAuthInfo option that enables writing details of the
158 authentication methods used (including public keys where applicable)
159 to a file that is exposed via a $SSH_USER_AUTH environment variable in
160 the subsequent session.
161 - ssh(1): Add support for reverse dynamic forwarding. In this mode, ssh
162 will act as a SOCKS4/5 proxy and forward connections to destinations
163 requested by the remote SOCKS client. This mode is requested using
164 extended syntax for the -R and RemoteForward options and, because it
165 is implemented solely at the client, does not require the server be
166 updated to be supported.
167 - sshd(8): Allow LogLevel directive in sshd_config Match blocks.
168 - ssh-keygen(1): Allow inclusion of arbitrary string or flag certificate
169 extensions and critical options.
170 - ssh-keygen(1): Allow ssh-keygen to use a key held in ssh-agent as a CA
171 when signing certificates.
172 - ssh(1)/sshd(8): Allow IPQoS=none in ssh/sshd to not set an explicit
173 ToS/DSCP value and just use the operating system default.
174 - ssh-add(1): Add -q option to make ssh-add quiet on success.
175 - ssh(1): Expand the StrictHostKeyChecking option with two new settings.
176 The first "accept-new" will automatically accept hitherto-unseen keys
177 but will refuse connections for changed or invalid hostkeys. This is
178 a safer subset of the current behaviour of StrictHostKeyChecking=no.
179 The second setting "off", is a synonym for the current behaviour of
180 StrictHostKeyChecking=no: accept new host keys, and continue
181 connection for hosts with incorrect hostkeys. A future release will
182 change the meaning of StrictHostKeyChecking=no to the behaviour of
183 "accept-new".
184 - ssh(1): Add SyslogFacility option to ssh(1) matching the equivalent
185 option in sshd(8).
186 - ssh(1): Use HostKeyAlias if specified instead of hostname for matching
187 host certificate principal names.
188 - sftp(1): Implement sorting for globbed ls.
189 - ssh(1): Add a user@host prefix to client's "Permission denied"
190 messages, useful in particular when using "stacked" connections (e.g.
191 ssh -J) where it's not clear which host is denying.
192 - ssh(1): Accept unknown EXT_INFO extension values that contain \0
193 characters. These are legal, but would previously cause fatal
194 connection errors if received.
195 - sftp(1): Print '?' instead of incorrect link count (that the protocol
196 doesn't provide) for remote listings.
197 - ssh(1): Return failure rather than fatal() for more cases during
198 session multiplexing negotiations. Causes the session to fall back to
199 a non-mux connection if they occur.
200 - ssh(1): Mention that the server may send debug messages to explain
201 public key authentication problems under some circumstances.
202 - Translate OpenSSL error codes to better report incorrect passphrase
203 errors when loading private keys.
204 - sshd(8): Adjust compatibility patterns for WinSCP to correctly
205 identify versions that implement only the legacy DH group exchange
206 scheme (closes: #877800).
207 - ssh(1): Print the "Killed by signal 1" message only at LogLevel
208 verbose so that it is not shown at the default level; prevents it from
209 appearing during ssh -J and equivalent ProxyCommand configs.
210 - ssh-keygen(1): When generating all hostkeys (ssh-keygen -A), clobber
211 existing keys if they exist but are zero length. Zero-length keys
212 could previously be made if ssh-keygen failed or was interrupted part
213 way through generating them.
214 - ssh-keyscan(1): Avoid double-close() on file descriptors.
215 - sshd(8): Avoid reliance on shared use of pointers shared between
216 monitor and child sshd processes.
217 - sshd_config(8): Document available AuthenticationMethods.
218 - ssh(1): Avoid truncation in some login prompts.
219 - ssh(1): Make "--" before the hostname terminate argument processing
220 after the hostname too (closes: #873201).
221 - ssh-keygen(1): Switch from aes256-cbc to aes256-ctr for encrypting
222 new-style private keys.
223 - ssh(1): Warn and do not attempt to use keys when the public and
224 private halves do not match.
225 - sftp(1): Don't print verbose error message when ssh disconnects from
226 under sftp.
227 - sshd(8): Fix keepalive scheduling problem: prevent activity on a
228 forwarded port from preventing the keepalive from being sent.
229 - sshd(8): When started without root privileges, don't require the
230 privilege separation user or path to exist.
231 - ssh(1)/sshd(8): Correctness fix for channels implementation: accept
232 channel IDs greater than 0x7FFFFFFF.
233 - sshd(8): Expose list of completed authentication methods to PAM via
234 the SSH_AUTH_INFO_0 PAM environment variable.
235 - ssh(1)/sshd(8): Fix several problems in the tun/tap forwarding code,
236 mostly to do with host/network byte order confusion.
237 - sshd(8): Avoid Linux seccomp violations on ppc64le over the socketcall
238 syscall.
239 * Build-depend on debhelper (>= 9.20160709~) rather than dh-systemd.
240 * Change priorities of ssh and ssh-krb5 binary packages to optional, since
241 "Priority: extra" is now deprecated.
242 * Use HTTPS form of copyright-format URL.
243 * Adjust "Running sshd from inittab" instructions in README.Debian to
244 recommend using service(8) rather than calling the init script directly.
245 * Policy version 4.1.0.
246 * Adjust "Per-connection sshd instances with systemd" instructions in
247 README.Debian to recommend using a drop-in file rather than copying and
248 modifying the ssh.socket unit file.
249
250 -- Colin Watson <cjwatson@debian.org> Fri, 06 Oct 2017 12:36:48 +0100
251
252openssh (1:7.5p1-10) unstable; urgency=medium
253
254 * Tell haveged to create the pid file we expect.
255 * Give up and use systemctl to start haveged if running under systemd;
256 this shouldn't be necessary, but I can't seem to get things working in
257 the Ubuntu autopkgtest environment otherwise.
258
259 -- Colin Watson <cjwatson@debian.org> Fri, 01 Sep 2017 11:17:19 +0100
260
261openssh (1:7.5p1-9) unstable; urgency=medium
262
263 * Run debian/tests/regress with "set -x".
264 * Run haveged without "-w 1024", as setting the low water mark doesn't
265 seem possible in all autopkgtest virtualisation environments.
266
267 -- Colin Watson <cjwatson@debian.org> Thu, 31 Aug 2017 13:23:04 +0100
268
269openssh (1:7.5p1-8) unstable; urgency=medium
270
271 * Drop openssh-client-ssh1, now built by a separate source package.
272 * Run haveged during autopkgtests to ensure that they have enough entropy
273 for key generation (LP: #1712921).
274 * Apply patches from https://bugzilla.mindrot.org/show_bug.cgi?id=2752 to
275 allow some extra syscalls for crypto cards on s390x (LP: #1686618).
276
277 -- Colin Watson <cjwatson@debian.org> Mon, 28 Aug 2017 12:16:35 +0100
278
279openssh (1:7.5p1-7) unstable; urgency=medium
280
281 * Fix spelling of RuntimeDirectoryMode (closes: #872976).
282 * Add RuntimeDirectory and RuntimeDirectoryMode to ssh@.service as well as
283 ssh.service (closes: #872978).
284
285 -- Colin Watson <cjwatson@debian.org> Wed, 23 Aug 2017 12:12:59 +0100
286
287openssh (1:7.5p1-6) unstable; urgency=medium
288
289 [ Colin Watson ]
290 * Test configuration before starting or reloading sshd under systemd
291 (closes: #865770).
292 * Create /run/sshd under systemd using RuntimeDirectory rather than
293 tmpfiles.d (thanks, Dmitry Smirnov; closes: #864190).
294
295 [ Dimitri John Ledkov ]
296 * Drop upstart system and user jobs (closes: #872851).
297
298 [ Chris Lamb ]
299 * Quote IP address in suggested "ssh-keygen -f" calls (closes: #872643).
300
301 -- Colin Watson <cjwatson@debian.org> Wed, 23 Aug 2017 01:41:06 +0100
302
303openssh (1:7.5p1-5) unstable; urgency=medium
304
305 * Upload to unstable.
306 * Fix syntax error in debian/copyright.
307
308 -- Colin Watson <cjwatson@debian.org> Sun, 18 Jun 2017 12:08:42 +0100
309
310openssh (1:7.5p1-4) experimental; urgency=medium
311
312 * Drop README.Debian section on privilege separation, as it's no longer
313 optional.
314 * Only call "initctl set-env" from agent-launch if $UPSTART_SESSION is set
315 (LP: #1689299).
316 * Fix incoming compression statistics (thanks, Russell Coker; closes:
317 #797964).
318 * Relicense debian/* under a two-clause BSD licence for bidirectional
319 compatibility with upstream, with permission from Matthew Vernon and
320 others.
321
322 -- Colin Watson <cjwatson@debian.org> Tue, 06 Jun 2017 15:17:58 +0100
323
324openssh (1:7.5p1-3) experimental; urgency=medium
325
326 * Fix debian/adjust-openssl-dependencies to account for preferring
327 libssl1.0-dev.
328 * Adjust OpenSSL dependencies for openssh-client-ssh1 too.
329 * Fix purge failure when /etc/ssh has already somehow been removed
330 (LP: #1682817).
331 * Ensure that /etc/ssh exists before trying to create /etc/ssh/sshd_config
332 (LP: #1685022).
333
334 -- Colin Watson <cjwatson@debian.org> Tue, 02 May 2017 13:51:27 +0100
335
336openssh (1:7.5p1-2) experimental; urgency=medium
337
338 * Add missing header on Linux/s390.
339 * Fix syntax error on Linux/X32.
340
341 -- Colin Watson <cjwatson@debian.org> Sun, 02 Apr 2017 13:20:11 +0100
342
343openssh (1:7.5p1-1) experimental; urgency=medium
344
345 * New upstream release (https://www.openssh.com/txt/release-7.5):
346 - SECURITY: ssh(1), sshd(8): Fix weakness in CBC padding oracle
347 countermeasures that allowed a variant of the attack fixed in OpenSSH
348 7.3 to proceed. Note that the OpenSSH client disables CBC ciphers by
349 default, sshd offers them as lowest-preference options and will remove
350 them by default entirely in the next release.
351 - This release deprecates the sshd_config UsePrivilegeSeparation option,
352 thereby making privilege separation mandatory (closes: #407754).
353 - The format of several log messages emitted by the packet code has
354 changed to include additional information about the user and their
355 authentication state. Software that monitors ssh/sshd logs may need
356 to account for these changes.
357 - ssh(1), sshd(8): Support "=-" syntax to easily remove methods from
358 algorithm lists, e.g. Ciphers=-*cbc.
359 - sshd(1): Fix NULL dereference crash when key exchange start messages
360 are sent out of sequence.
361 - ssh(1), sshd(8): Allow form-feed characters to appear in configuration
362 files.
363 - sshd(8): Fix regression in OpenSSH 7.4 support for the server-sig-algs
364 extension, where SHA2 RSA signature methods were not being correctly
365 advertised.
366 - ssh(1), ssh-keygen(1): Fix a number of case-sensitivity bugs in
367 known_hosts processing.
368 - ssh(1): Allow ssh to use certificates accompanied by a private key
369 file but no corresponding plain *.pub public key.
370 - ssh(1): When updating hostkeys using the UpdateHostKeys option, accept
371 RSA keys if HostkeyAlgorithms contains any RSA keytype. Previously,
372 ssh could ignore RSA keys when only the ssh-rsa-sha2-* methods were
373 enabled in HostkeyAlgorithms and not the old ssh-rsa method.
374 - ssh(1): Detect and report excessively long configuration file lines.
375 - Merge a number of fixes found by Coverity and reported via Redhat and
376 FreeBSD. Includes fixes for some memory and file descriptor leaks in
377 error paths.
378 - ssh(1), sshd(8): When logging long messages to stderr, don't truncate
379 "\r\n" if the length of the message exceeds the buffer.
380 - ssh(1): Fully quote [host]:port in generated ProxyJump/-J command-
381 line; avoid confusion over IPv6 addresses and shells that treat square
382 bracket characters specially.
383 - Fix various fallout and sharp edges caused by removing SSH protocol 1
384 support from the server, including the server banner string being
385 incorrectly terminated with only \n (instead of \r\n), confusing error
386 messages from ssh-keyscan, and a segfault in sshd if protocol v.1 was
387 enabled for the client and sshd_config contained references to legacy
388 keys.
389 - ssh(1), sshd(8): Free fd_set on connection timeout.
390 - sftp(1): Fix division by zero crash in "df" output when server returns
391 zero total filesystem blocks/inodes.
392 - ssh(1), ssh-add(1), ssh-keygen(1), sshd(8): Translate OpenSSL errors
393 encountered during key loading to more meaningful error codes.
394 - ssh-keygen(1): Sanitise escape sequences in key comments sent to
395 printf but preserve valid UTF-8 when the locale supports it.
396 - ssh(1), sshd(8): Return reason for port forwarding failures where
397 feasible rather than always "administratively prohibited".
398 - sshd(8): Fix deadlock when AuthorizedKeysCommand or
399 AuthorizedPrincipalsCommand produces a lot of output and a key is
400 matched early.
401 - ssh(1): Fix typo in ~C error message for bad port forward
402 cancellation.
403 - ssh(1): Show a useful error message when included config files can't
404 be opened.
405 - sshd_config(5): Repair accidentally-deleted mention of %k token in
406 AuthorizedKeysCommand.
407 - sshd(8): Remove vestiges of previously removed LOGIN_PROGRAM.
408 - ssh-agent(1): Relax PKCS#11 whitelist to include libexec and common
409 32-bit compatibility library directories.
410 - sftp-client(1): Fix non-exploitable integer overflow in SSH2_FXP_NAME
411 response handling.
412 - ssh-agent(1): Fix regression in 7.4 of deleting PKCS#11-hosted keys.
413 It was not possible to delete them except by specifying their full
414 physical path.
415 - sshd(8): Avoid sandbox errors for Linux S390 systems using an ICA
416 crypto coprocessor.
417 - sshd(8): Fix non-exploitable weakness in seccomp-bpf sandbox arg
418 inspection.
419 - ssh-keygen(1), ssh(1), sftp(1): Fix output truncation for various that
420 contain non-printable characters where the codeset in use is ASCII.
421
422 -- Colin Watson <cjwatson@debian.org> Sun, 02 Apr 2017 02:58:01 +0100
423
424openssh (1:7.4p1-11) unstable; urgency=medium
425
426 * Fix incoming compression statistics (thanks, Russell Coker; closes:
427 #797964).
428
429 -- Colin Watson <cjwatson@debian.org> Tue, 06 Jun 2017 15:03:48 +0100
430
431openssh (1:7.4p1-10) unstable; urgency=medium
432
433 * Move privilege separation directory and PID file from /var/run/ to /run/
434 (closes: #760422, #856825).
435 * Unbreak Unix domain socket forwarding for root (closes: #858252).
436
437 -- Colin Watson <cjwatson@debian.org> Thu, 30 Mar 2017 11:19:04 +0100
438
439openssh (1:7.4p1-9) unstable; urgency=medium
440
441 * Fix null pointer dereference in ssh-keygen; this fixes an autopkgtest
442 regression introduced in 1:7.4p1-8.
443
444 -- Colin Watson <cjwatson@debian.org> Thu, 16 Mar 2017 13:43:15 +0000
445
446openssh (1:7.4p1-8) unstable; urgency=medium
447
448 * Fix ssh-keygen -H accidentally corrupting known_hosts that contained
449 already-hashed entries (closes: #851734, LP: #1668093).
450 * Fix ssh-keyscan to correctly hash hosts with a port number (closes:
451 #857736, LP: #1670745).
452
453 -- Colin Watson <cjwatson@debian.org> Tue, 14 Mar 2017 13:49:14 +0000
454
455openssh (1:7.4p1-7) unstable; urgency=medium
456
457 * Don't set "PermitRootLogin yes" on fresh installations (regression
458 introduced in 1:7.4p1-1; closes: #852781).
459 * Restore reading authorized_keys2 by default. Upstream seems to intend
460 to gradually phase this out, so don't assume that this will remain the
461 default forever. However, we were late in adopting the upstream
462 sshd_config changes, so it makes sense to extend the grace period
463 (closes: #852320).
464
465 -- Colin Watson <cjwatson@debian.org> Sun, 05 Mar 2017 02:12:42 +0000
466
467openssh (1:7.4p1-6) unstable; urgency=medium
468
469 * Remove temporary file on exit from postinst (closes: #850275).
470 * Remove LOGIN_PROGRAM and LOGIN_NO_ENDOPT definitions, since UseLogin is
471 gone.
472 * Document sshd_config changes that may be needed following the removal of
473 protocol 1 support from sshd (closes: #851573).
474 * Remove ssh_host_dsa_key from HostKey default (closes: #850614).
475 * Fix rekeying failure with GSSAPI key exchange (thanks, Harald Barth;
476 closes: #819361, LP: #1608965).
477
478 -- Colin Watson <cjwatson@debian.org> Mon, 16 Jan 2017 15:11:10 +0000
479
480openssh (1:7.4p1-5) unstable; urgency=medium
481
482 * Create mux socket for regression tests in a temporary directory.
483 * Work around clock_gettime kernel bug on Linux x32 (closes: #849923).
484
485 -- Colin Watson <cjwatson@debian.org> Tue, 03 Jan 2017 14:43:28 +0000
486
487openssh (1:7.4p1-4) unstable; urgency=medium
488
489 * Run regression tests inside annotate-output to try to diagnose timeout
490 issues.
491 * Make integrity tests more robust against timeouts in the case where the
492 first test in a series for a given MAC happens to modify the low bytes
493 of a packet length.
494 * Fix race conditions in forwarding tests.
495
496 -- Colin Watson <cjwatson@debian.org> Mon, 02 Jan 2017 19:37:23 +0000
497
498openssh (1:7.4p1-3) unstable; urgency=medium
499
500 * Revert attempted hack around regress/forwarding.sh test failure, since
501 it doesn't seem to help.
502 * Run regression tests using 'sh -x' to try to get more information about
503 failures.
504 * Dump some useful log files if regression tests fail.
505 * Tweak regression test setup to cope with the case where some of the
506 source directory is unreadable by the openssh-tests user.
507
508 -- Colin Watson <cjwatson@debian.org> Sat, 31 Dec 2016 02:48:17 +0000
509
510openssh (1:7.4p1-2) unstable; urgency=medium
511
512 * Attempt to hack around regress/forwarding.sh test failure in some
513 environments.
514 * Avoid calling into Kerberos libraries from ssh_gssapi_server_mechanisms
515 in the privsep monitor.
516
517 -- Colin Watson <cjwatson@debian.org> Thu, 29 Dec 2016 12:02:12 +0000
518
519openssh (1:7.4p1-1) unstable; urgency=medium
520
521 * New upstream release (http://www.openssh.com/txt/release-7.4):
522 - ssh(1): Remove 3des-cbc from the client's default proposal. 64-bit
523 block ciphers are not safe in 2016 and we don't want to wait until
524 attacks like SWEET32 are extended to SSH. As 3des-cbc was the only
525 mandatory cipher in the SSH RFCs, this may cause problems connecting
526 to older devices using the default configuration, but it's highly
527 likely that such devices already need explicit configuration for key
528 exchange and hostkey algorithms already anyway.
529 - sshd(8): When a forced-command appears in both a certificate and an
530 authorized keys/principals command= restriction, sshd will now refuse
531 to accept the certificate unless they are identical. The previous
532 (documented) behaviour of having the certificate forced-command
533 override the other could be a bit confusing and error-prone.
534 - sshd(8): Remove the UseLogin configuration directive and support for
535 having /bin/login manage login sessions.
536 - CVE-2016-10009: ssh-agent(1): Will now refuse to load PKCS#11 modules
537 from paths outside a trusted whitelist (run-time configurable).
538 Requests to load modules could be passed via agent forwarding and an
539 attacker could attempt to load a hostile PKCS#11 module across the
540 forwarded agent channel: PKCS#11 modules are shared libraries, so this
541 would result in code execution on the system running the ssh-agent if
542 the attacker has control of the forwarded agent-socket (on the host
543 running the sshd server) and the ability to write to the filesystem of
544 the host running ssh-agent (usually the host running the ssh client)
545 (closes: #848714).
546 - CVE-2016-10010: sshd(8): When privilege separation is disabled,
547 forwarded Unix-domain sockets would be created by sshd(8) with the
548 privileges of 'root' instead of the authenticated user. This release
549 refuses Unix-domain socket forwarding when privilege separation is
550 disabled (Privilege separation has been enabled by default for 14
551 years) (closes: #848715).
552 - CVE-2016-10011: sshd(8): Avoid theoretical leak of host private key
553 material to privilege-separated child processes via realloc() when
554 reading keys. No such leak was observed in practice for normal-sized
555 keys, nor does a leak to the child processes directly expose key
556 material to unprivileged users (closes: #848716).
557 - CVE-2016-10012: sshd(8): The shared memory manager used by
558 pre-authentication compression support had a bounds checks that could
559 be elided by some optimising compilers. Additionally, this memory
560 manager was incorrectly accessible when pre-authentication compression
561 was disabled. This could potentially allow attacks against the
562 privileged monitor process from the sandboxed privilege-separation
563 process (a compromise of the latter would be required first). This
564 release removes support for pre-authentication compression from
565 sshd(8) (closes: #848717).
566 - SECURITY: sshd(8): Validate address ranges for AllowUser and DenyUsers
567 directives at configuration load time and refuse to accept invalid
568 ones. It was previously possible to specify invalid CIDR address
569 ranges (e.g. user@127.1.2.3/55) and these would always match, possibly
570 resulting in granting access where it was not intended.
571 - ssh(1): Add a proxy multiplexing mode to ssh(1) inspired by the
572 version in PuTTY by Simon Tatham. This allows a multiplexing client
573 to communicate with the master process using a subset of the SSH
574 packet and channels protocol over a Unix-domain socket, with the main
575 process acting as a proxy that translates channel IDs, etc. This
576 allows multiplexing mode to run on systems that lack file-descriptor
577 passing (used by current multiplexing code) and potentially, in
578 conjunction with Unix-domain socket forwarding, with the client and
579 multiplexing master process on different machines. Multiplexing proxy
580 mode may be invoked using "ssh -O proxy ...".
581 - sshd(8): Add a sshd_config DisableForwarding option that disables X11,
582 agent, TCP, tunnel and Unix domain socket forwarding, as well as
583 anything else we might implement in the future. Like the 'restrict'
584 authorized_keys flag, this is intended to be a simple and future-proof
585 way of restricting an account.
586 - sshd(8), ssh(1): Support the "curve25519-sha256" key exchange method.
587 This is identical to the currently-supported method named
588 "curve25519-sha256@libssh.org".
589 - sshd(8): Improve handling of SIGHUP by checking to see if sshd is
590 already daemonised at startup and skipping the call to daemon(3) if it
591 is. This ensures that a SIGHUP restart of sshd(8) will retain the
592 same process-ID as the initial execution. sshd(8) will also now
593 unlink the PidFile prior to SIGHUP restart and re-create it after a
594 successful restart, rather than leaving a stale file in the case of a
595 configuration error.
596 - sshd(8): Allow ClientAliveInterval and ClientAliveCountMax directives
597 to appear in sshd_config Match blocks.
598 - sshd(8): Add %-escapes to AuthorizedPrincipalsCommand to match those
599 supported by AuthorizedKeysCommand (key, key type, fingerprint, etc.)
600 and a few more to provide access to the contents of the certificate
601 being offered.
602 - ssh(1): Allow IdentityFile to successfully load and use certificates
603 that have no corresponding bare public key.
604 - ssh(1): Fix public key authentication when multiple authentication is
605 in use and publickey is not just the first method attempted.
606 - ssh(1): Improve reporting when attempting to load keys from PKCS#11
607 tokens with fewer useless log messages and more detail in debug
608 messages.
609 - ssh(1): When tearing down ControlMaster connections, don't pollute
610 stderr when LogLevel=quiet.
611 - sftp(1): On ^Z wait for underlying ssh(1) to suspend before suspending
612 sftp(1) to ensure that ssh(1) restores the terminal mode correctly if
613 suspended during a password prompt.
614 - ssh(1): Avoid busy-wait when ssh(1) is suspended during a password
615 prompt (LP: #1646813).
616 - ssh(1), sshd(8): Correctly report errors during sending of ext-info
617 messages.
618 - sshd(8): Fix NULL-deref crash if sshd(8) received an out-of-sequence
619 NEWKEYS message.
620 - sshd(8): Correct list of supported signature algorithms sent in the
621 server-sig-algs extension.
622 - sshd(8): Fix sending ext_info message if privsep is disabled.
623 - sshd(8): More strictly enforce the expected ordering of privilege
624 separation monitor calls used for authentication and allow them only
625 when their respective authentication methods are enabled in the
626 configuration.
627 - sshd_config(5): Use 2001:db8::/32, the official IPv6 subnet for
628 configuration examples.
629 - On environments configured with Turkish locales, fall back to the
630 C/POSIX locale to avoid errors in configuration parsing caused by that
631 locale's unique handling of the letters 'i' and 'I' (LP: #1638338).
632 - contrib: Add a gnome-ssh-askpass3 with GTK+3 support.
633 - sshd(8): Improve PRNG reseeding across privilege separation and force
634 libcrypto to obtain a high-quality seed before chroot or sandboxing.
635 * Apply "wrap-and-sort -at -f debian/control -f debian/tests/control".
636 * Remove entries related to protocol 1 from the default sshd_config
637 generated on new installations.
638 * Remove some advice related to protocol 1 from README.Debian.
639 * Start handling /etc/ssh/sshd_config using ucf. The immediate motivation
640 for this is to deal with deprecations of options related to protocol 1,
641 but something like this has been needed for a long time (closes:
642 #419574, #848089):
643 - sshd_config is now a slightly-patched version of upstream's, and only
644 contains non-default settings (closes: #147201).
645 - I've included as many historical md5sums of default versions of
646 sshd_config as I could reconstruct from version control, but I'm sure
647 I've missed some.
648 - Explicitly synchronise the debconf database with the current
649 configuration file state in openssh-server.config, to ensure that the
650 PermitRootLogin setting is properly preserved.
651 - UsePrivilegeSeparation now defaults to the stronger "sandbox" rather
652 than "yes", per upstream.
653 * Remove redundant "GSSAPIDelegateCredentials no" from ssh_config (already
654 the upstream default), and document that setting ServerAliveInterval to
655 300 by default if BatchMode is set is Debian-specific (closes: #765630).
656 * Build gnome-ssh-askpass with GTK+ 3 (LP: #801187).
657 * When running regression tests under autopkgtest, use a non-root user
658 with passwordless sudo.
659
660 -- Colin Watson <cjwatson@debian.org> Tue, 27 Dec 2016 18:01:46 +0000
661
662openssh (1:7.3p1-5) unstable; urgency=medium
663
664 * debian/tests/control: Add dependency on openssl, required by the PuTTY
665 interoperability tests.
666
667 -- Colin Watson <cjwatson@debian.org> Sat, 03 Dec 2016 03:43:21 +0000
668
669openssh (1:7.3p1-4) unstable; urgency=medium
670
671 * Adjust Build-Depends further to avoid considering libssl-dev >= 1.1.0~
672 as sufficient.
673 * Move build directories under debian/.
674 * Remove the non-upstream .gitignore file and add the relevant entries to
675 debian/.gitignore, in order to make the source tree more
676 dgit-compatible.
677 * Build all upstream regression test binaries using the new
678 "regress-binaries" target.
679 * Fix and enable PuTTY interoperability tests under autopkgtest.
680
681 -- Colin Watson <cjwatson@debian.org> Fri, 02 Dec 2016 20:49:30 +0000
682
683openssh (1:7.3p1-3) unstable; urgency=medium
684
685 * Avoid building with OpenSSL 1.1 for now (see #828475).
686 * Add a missing License line to debian/copyright.
687 * Policy version 3.9.8: no changes required.
688
689 -- Colin Watson <cjwatson@debian.org> Sat, 05 Nov 2016 15:37:15 +0000
690
691openssh (1:7.3p1-2) unstable; urgency=high
692
693 * Rewrite debian/copyright using copyright-format 1.0.
694 * CVE-2016-8858: Unregister the KEXINIT handler after message has been
695 received (closes: #841884).
696
697 -- Colin Watson <cjwatson@debian.org> Mon, 24 Oct 2016 11:18:00 +0100
698
699openssh (1:7.3p1-1) unstable; urgency=medium
700
701 * New upstream release (http://www.openssh.com/txt/release-7.3):
702 - SECURITY: sshd(8): Mitigate a potential denial-of-service attack
703 against the system's crypt(3) function via sshd(8). An attacker could
704 send very long passwords that would cause excessive CPU use in
705 crypt(3). sshd(8) now refuses to accept password authentication
706 requests of length greater than 1024 characters.
707 - SECURITY: ssh(1), sshd(8): Fix observable timing weakness in the CBC
708 padding oracle countermeasures. Note that CBC ciphers are disabled by
709 default and only included for legacy compatibility.
710 - SECURITY: ssh(1), sshd(8): Improve operation ordering of MAC
711 verification for Encrypt-then-MAC (EtM) mode transport MAC algorithms
712 to verify the MAC before decrypting any ciphertext. This removes the
713 possibility of timing differences leaking facts about the plaintext,
714 though no such leakage has been observed.
715 - ssh(1): Add a ProxyJump option and corresponding -J command-line flag
716 to allow simplified indirection through a one or more SSH bastions or
717 "jump hosts".
718 - ssh(1): Add an IdentityAgent option to allow specifying specific agent
719 sockets instead of accepting one from the environment.
720 - ssh(1): Allow ExitOnForwardFailure and ClearAllForwardings to be
721 optionally overridden when using ssh -W.
722 - ssh(1), sshd(8): Implement support for the IUTF8 terminal mode as per
723 draft-sgtatham-secsh-iutf8-00 (closes: #337041, LP: #394570).
724 - ssh(1), sshd(8): Add support for additional fixed Diffie-Hellman 2K,
725 4K and 8K groups from draft-ietf-curdle-ssh-kex-sha2-03.
726 - ssh-keygen(1), ssh(1), sshd(8): Support SHA256 and SHA512 RSA
727 signatures in certificates.
728 - ssh(1): Add an Include directive for ssh_config(5) files (closes:
729 #536031).
730 - ssh(1): Permit UTF-8 characters in pre-authentication banners sent
731 from the server.
732 - ssh(1), sshd(8): Reduce the syslog level of some relatively common
733 protocol events from LOG_CRIT.
734 - sshd(8): Refuse AuthenticationMethods="" in configurations and accept
735 AuthenticationMethods=any for the default behaviour of not requiring
736 multiple authentication.
737 - sshd(8): Remove obsolete and misleading "POSSIBLE BREAK-IN ATTEMPT!"
738 message when forward and reverse DNS don't match.
739 - ssh(1): Deduplicate LocalForward and RemoteForward entries to fix
740 failures when both ExitOnForwardFailure and hostname canonicalisation
741 are enabled.
742 - sshd(8): Remove fallback from moduli to obsolete "primes" file that
743 was deprecated in 2001 (LP: #1528251).
744 - sshd_config(5): Correct description of UseDNS: it affects ssh hostname
745 processing for authorized_keys, not known_hosts.
746 - sshd(8): Send ClientAliveInterval pings when a time-based RekeyLimit
747 is set; previously keepalive packets were not being sent.
748 - sshd(8): Whitelist more architectures to enable the seccomp-bpf
749 sandbox.
750 - scp(1): Respect the local user's LC_CTYPE locale (closes: #396295).
751 - Take character display widths into account for the progressmeter
752 (closes: #407088).
753
754 -- Colin Watson <cjwatson@debian.org> Sun, 07 Aug 2016 22:45:26 +0100
755
756openssh (1:7.2p2-8) unstable; urgency=medium
757
758 [ Colin Watson ]
759 * Stop enabling ssh-session-cleanup.service by default; instead, ship it
760 as an example and add a section to README.Debian. libpam-systemd >= 230
761 and "UsePAM yes" should take care of the original problem for most
762 systemd users (thanks, Michael Biebl; closes: #832155).
763
764 [ Martin Pitt ]
765 * Add debian/agent-launch: Helper script for conditionally starting the SSH
766 agent in the user session. Use it in ssh-agent.user-session.upstart.
767 * Add systemd user unit for graphical sessions that use systemd. Override
768 the corresponding upstart job in that case (closes: #832445).
769 * debian/openssh-server.if-up: Don't block on a finished reload of
770 openssh.service, to avoid deadlocking with restarting networking.
771 (closes: #832557, LP: #1584393)
772
773 -- Colin Watson <cjwatson@debian.org> Fri, 29 Jul 2016 02:51:32 +0100
774
775openssh (1:7.2p2-7) unstable; urgency=medium
776
777 * Don't stop the ssh-session-cleanup service on upgrade (closes: #832155).
778 This may cause SSH sessions to be killed on upgrade to *this* version if
779 you had previously installed 1:7.2p2-6. Sorry! If your session is
780 killed, you can recover using "dpkg --unpack" on this openssh-server
781 .deb, followed by "dpkg --configure -a".
782 * Recommend libpam-systemd from openssh-server. It's a much better
783 solution than the above for systemd users, but I'm wary of depending on
784 it in case I cause an assortment of exciting dependency problems on
785 upgrade for non-systemd users.
786
787 -- Colin Watson <cjwatson@debian.org> Sat, 23 Jul 2016 11:46:33 +0100
788
789openssh (1:7.2p2-6) unstable; urgency=medium
790
791 * debian/watch: Switch to HTTP (thanks, Nicholas Luedtke; closes:
792 #822997).
793 * Copy summary of supported SFTP protocol versions from upstream's
794 PROTOCOL file into the openssh-sftp-server package description (closes:
795 #766887).
796 * Set SSH_PROGRAM=/usr/bin/ssh1 when building openssh-client-ssh1 so that
797 scp1 works (reported by Olivier MATZ).
798 * Retroactively add a NEWS.Debian entry for the UseDNS change in 6.9 (see
799 LP #1588457).
800 * CVE-2016-6210: Mitigate user enumeration via covert timing channel
801 (closes: #831902).
802 * Backport upstream patch to close ControlPersist background process
803 stderr when not in debug mode or when logging to a file or syslog
804 (closes: #714526).
805 * Add a session cleanup script and a systemd unit file to trigger it,
806 which serves to terminate SSH sessions cleanly if systemd doesn't do
807 that itself, often because libpam-systemd is not installed (thanks,
808 Vivek Das Mohapatra, Tom Hutter, and others; closes: #751636).
809 * Stop generating DSA host keys by default (thanks, Santiago Vila; closes:
810 #823827).
811
812 -- Colin Watson <cjwatson@debian.org> Fri, 22 Jul 2016 17:06:19 +0100
813
814openssh (1:7.2p2-5) unstable; urgency=medium
815
816 * Backport upstream patch to unbreak authentication using lone certificate
817 keys in ssh-agent: when attempting pubkey auth with a certificate, if no
818 separate private key is found among the keys then try with the
819 certificate key itself (thanks, Paul Querna; LP: #1575961).
820
821 -- Colin Watson <cjwatson@debian.org> Thu, 28 Apr 2016 01:52:01 +0100
822
823openssh (1:7.2p2-4) unstable; urgency=medium
824
825 * Drop dependency on libnss-files-udeb (closes: #819686).
826 * Policy version 3.9.7: no changes required.
827
828 -- Colin Watson <cjwatson@debian.org> Fri, 15 Apr 2016 16:40:07 +0100
829
830openssh (1:7.2p2-3) unstable; urgency=high
831
832 * Change all openssh.org references to openssh.com (closes: #819213).
833 * CVE-2015-8325: Ignore PAM environment vars when UseLogin=yes.
834
835 -- Colin Watson <cjwatson@debian.org> Wed, 13 Apr 2016 16:42:28 +0100
836
837openssh (1:7.2p2-2) unstable; urgency=medium
838
839 * Fix kexgss_server to cope with DH_GRP_MIN/DH_GRP_MAX being stricter on
840 the server end than the client (thanks, Damien Miller; closes: #817870,
841 LP: #1558576).
842
843 -- Colin Watson <cjwatson@debian.org> Mon, 21 Mar 2016 12:08:55 +0000
844
845openssh (1:7.2p2-1) unstable; urgency=high
846
847 * New upstream release (http://www.openssh.com/txt/release-7.2p2):
848 - CVE-2016-3115: sshd(8): Sanitise X11 authentication credentials to
849 avoid xauth command injection when X11Forwarding is enabled
850 (http://www.openssh.com/txt/x11fwd.adv).
851
852 -- Colin Watson <cjwatson@debian.org> Thu, 10 Mar 2016 13:04:29 +0000
853
854openssh (1:7.2p1-1) unstable; urgency=medium
855
856 * New upstream release (http://www.openssh.com/txt/release-7.2):
857 - This release disables a number of legacy cryptographic algorithms by
858 default in ssh:
859 + Several ciphers blowfish-cbc, cast128-cbc, all arcfour variants and
860 the rijndael-cbc aliases for AES.
861 + MD5-based and truncated HMAC algorithms.
862 These algorithms are already disabled by default in sshd.
863 - ssh(1), sshd(8): Remove unfinished and unused roaming code (was
864 already forcibly disabled in OpenSSH 7.1p2).
865 - ssh(1): Eliminate fallback from untrusted X11 forwarding to trusted
866 forwarding when the X server disables the SECURITY extension.
867 - ssh(1), sshd(8): Increase the minimum modulus size supported for
868 diffie-hellman-group-exchange to 2048 bits.
869 - sshd(8): Pre-auth sandboxing is now enabled by default (previous
870 releases enabled it for new installations via sshd_config).
871 - all: Add support for RSA signatures using SHA-256/512 hash algorithms
872 based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt.
873 - ssh(1): Add an AddKeysToAgent client option which can be set to 'yes',
874 'no', 'ask', or 'confirm', and defaults to 'no'. When enabled, a
875 private key that is used during authentication will be added to
876 ssh-agent if it is running (with confirmation enabled if set to
877 'confirm').
878 - sshd(8): Add a new authorized_keys option "restrict" that includes all
879 current and future key restrictions (no-*-forwarding, etc.). Also add
880 permissive versions of the existing restrictions, e.g. "no-pty" ->
881 "pty". This simplifies the task of setting up restricted keys and
882 ensures they are maximally-restricted, regardless of any permissions
883 we might implement in the future.
884 - ssh(1): Add ssh_config CertificateFile option to explicitly list
885 certificates.
886 - ssh-keygen(1): Allow ssh-keygen to change the key comment for all
887 supported formats (closes: #811125).
888 - ssh-keygen(1): Allow fingerprinting from standard input, e.g.
889 "ssh-keygen -lf -" (closes: #509058).
890 - ssh-keygen(1): Allow fingerprinting multiple public keys in a file,
891 e.g. "ssh-keygen -lf ~/.ssh/authorized_keys".
892 - sshd(8): Support "none" as an argument for sshd_config Foreground and
893 ChrootDirectory. Useful inside Match blocks to override a global
894 default.
895 - ssh-keygen(1): Support multiple certificates (one per line) and
896 reading from standard input (using "-f -") for "ssh-keygen -L"
897 - ssh-keyscan(1): Add "ssh-keyscan -c ..." flag to allow fetching
898 certificates instead of plain keys.
899 - ssh(1): Better handle anchored FQDNs (e.g. 'cvs.openbsd.org.') in
900 hostname canonicalisation - treat them as already canonical and remove
901 the trailing '.' before matching ssh_config.
902 - sftp(1): Existing destination directories should not terminate
903 recursive uploads (regression in OpenSSH 6.8; LP: #1553378).
904 * Use HTTPS for Vcs-* URLs, and link to cgit rather than gitweb.
905 * Restore slogin symlinks for compatibility, although they were removed
906 upstream.
907
908 -- Colin Watson <cjwatson@debian.org> Tue, 08 Mar 2016 11:47:20 +0000
909
910openssh (1:7.1p2-2) unstable; urgency=medium
911
912 * Remove protocol 1 host key generation from openssh-server.postinst
913 (closes: #811265).
914
915 -- Colin Watson <cjwatson@debian.org> Sun, 17 Jan 2016 14:10:19 +0000
916
917openssh (1:7.1p2-1) unstable; urgency=high
918
919 * New upstream release (http://www.openssh.com/txt/release-7.1p2):
920 - CVE-2016-0777, CVE-2016-0778: Disable experimental client-side support
921 for roaming, which could be tricked by a malicious server into leaking
922 client memory to the server, including private client user keys; this
923 information leak is restricted to connections to malicious or
924 compromised servers (closes: #810984).
925 - SECURITY: Fix an out of-bound read access in the packet handling code.
926 Reported by Ben Hawkes.
927 - Further use of explicit_bzero has been added in various buffer
928 handling code paths to guard against compilers aggressively doing
929 dead-store removal.
930
931 -- Colin Watson <cjwatson@debian.org> Thu, 14 Jan 2016 15:28:03 +0000
932
933openssh (1:7.1p1-6) unstable; urgency=medium
934
935 [ Colin Watson ]
936 * Remove explicit "XS-Testsuite: autopkgtest" from debian/control;
937 dpkg-source now figures that out automatically based on the existence of
938 debian/tests/control.
939 * Allow authenticating as root using gssapi-keyex even with
940 "PermitRootLogin prohibit-password" (closes: #809695).
941 * Shuffle PROPOSAL_KEX_ALGS mangling for GSSAPI key exchange a little
942 later in ssh_kex2 so that it's actually effective (closes: #809696).
943
944 [ Michael Biebl ]
945 * Don't call sd_notify when sshd is re-execed (closes: #809035).
946
947 -- Colin Watson <cjwatson@debian.org> Mon, 04 Jan 2016 15:09:10 +0000
948
949openssh (1:7.1p1-5) unstable; urgency=medium
950
951 [ Michael Biebl ]
952 * Add systemd readiness notification support (closes: #778913).
953
954 -- Colin Watson <cjwatson@debian.org> Mon, 21 Dec 2015 22:10:07 +0000
955
956openssh (1:7.1p1-4) unstable; urgency=medium
957
958 * Backport upstream patch to unbreak connections with peers that set
959 first_kex_follows (LP: #1526357).
960
961 -- Colin Watson <cjwatson@debian.org> Tue, 15 Dec 2015 15:40:18 +0000
962
963openssh (1:7.1p1-3) unstable; urgency=medium
964
965 * Drop priority of openssh-client-ssh1 to extra (closes: #807518).
966 * Redirect regression test input from /dev/zero, since otherwise conch
967 will immediately send EOF.
968
969 -- Colin Watson <cjwatson@debian.org> Thu, 10 Dec 2015 15:12:10 +0000
970
971openssh (1:7.1p1-2) unstable; urgency=medium
972
973 * Really enable conch interoperability tests under autopkgtest.
974 * Drop SSH1 keepalive patch. Now that SSH1 is disabled at compile-time,
975 it's been rejected upstream and there isn't much point carrying it any
976 more.
977 * Add NEWS.Debian documenting cryptographic changes in OpenSSH 7.0
978 (closes: #806962).
979 * Add an openssh-client-ssh1 binary package for people who need to connect
980 to outdated SSH1-only servers (closes: #807107).
981 * Update "Subsystem sftp" path in example sshd_config (closes: #691004,
982 LP: #1437005).
983
984 -- Colin Watson <cjwatson@debian.org> Tue, 08 Dec 2015 15:33:08 +0000
985
986openssh (1:7.1p1-1) unstable; urgency=medium
987
988 * New upstream release (http://www.openssh.com/txt/release-7.0, closes:
989 #785190):
990 - Support for the legacy SSH version 1 protocol is disabled by default
991 at compile time.
992 - Support for the 1024-bit diffie-hellman-group1-sha1 key exchange is
993 disabled by default at run-time. It may be re-enabled using the
994 instructions at http://www.openssh.com/legacy.html
995 - Support for ssh-dss, ssh-dss-cert-* host and user keys is disabled by
996 default at run-time. These may be re-enabled using the instructions
997 at http://www.openssh.com/legacy.html
998 - Support for the legacy v00 cert format has been removed.
999 - The default for the sshd_config(5) PermitRootLogin option has changed
1000 from "yes" to "prohibit-password".
1001 - PermitRootLogin=without-password/prohibit-password now bans all
1002 interactive authentication methods, allowing only public-key,
1003 hostbased and GSSAPI authentication (previously it permitted
1004 keyboard-interactive and password-less authentication if those were
1005 enabled).
1006 - ssh_config(5): Add PubkeyAcceptedKeyTypes option to control which
1007 public key types are available for user authentication.
1008 - sshd_config(5): Add HostKeyAlgorithms option to control which public
1009 key types are offered for host authentications.
1010 - ssh(1), sshd(8): Extend Ciphers, MACs, KexAlgorithms,
1011 HostKeyAlgorithms, PubkeyAcceptedKeyTypes and HostbasedKeyTypes
1012 options to allow appending to the default set of algorithms instead of
1013 replacing it. Options may now be prefixed with a '+' to append to the
1014 default, e.g. "HostKeyAlgorithms=+ssh-dss".
1015 - sshd_config(5): PermitRootLogin now accepts an argument of
1016 'prohibit-password' as a less-ambiguous synonym of 'without-
1017 password'.
1018 - ssh(1), sshd(8): Add compatability workarounds for Cisco and more
1019 PuTTY versions.
1020 - Fix some omissions and errors in the PROTOCOL and PROTOCOL.mux
1021 documentation relating to Unix domain socket forwarding.
1022 - ssh(1): Improve the ssh(1) manual page to include a better description
1023 of Unix domain socket forwarding (closes: #779068).
1024 - ssh(1), ssh-agent(1): Skip uninitialised PKCS#11 slots, fixing
1025 failures to load keys when they are present.
1026 - ssh(1), ssh-agent(1): Do not ignore PKCS#11 hosted keys that wth empty
1027 CKA_ID.
1028 - sshd(8): Clarify documentation for UseDNS option.
1029 - Check realpath(3) behaviour matches what sftp-server requires and use
1030 a replacement if necessary.
1031 * New upstream release (http://www.openssh.com/txt/release-7.1):
1032 - sshd(8): OpenSSH 7.0 contained a logic error in PermitRootLogin=
1033 prohibit-password/without-password that could, depending on
1034 compile-time configuration, permit password authentication to root
1035 while preventing other forms of authentication. This problem was
1036 reported by Mantas Mikulenas.
1037 - ssh(1), sshd(8): Add compatibility workarounds for FuTTY.
1038 - ssh(1), sshd(8): Refine compatibility workarounds for WinSCP.
1039 - Fix a number of memory faults (double-free, free of uninitialised
1040 memory, etc) in ssh(1) and ssh-keygen(1). Reported by Mateusz
1041 Kocielski.
1042 * Change "PermitRootLogin without-password" to the new preferred spelling
1043 of "PermitRootLogin prohibit-password" in sshd_config, and update
1044 documentation to reflect the new upstream default.
1045 * Enable conch interoperability tests under autopkgtest.
1046
1047 -- Colin Watson <cjwatson@debian.org> Wed, 02 Dec 2015 20:18:35 +0000
1048
1049openssh (1:6.9p1-3) unstable; urgency=medium
1050
1051 * ssh_config(5): Fix markup errors in description of GSSAPITrustDns
1052 (closes: #799271).
1053 * Fix dh_install and dh_fixperms overrides to work properly with an
1054 architecture-independent-only build (closes: #806090).
1055 * Do much less work in architecture-independent-only builds.
1056 * Drop ConsoleKit session registration patch; it was only ever enabled for
1057 Ubuntu, which no longer needs it (LP: #1334916, #1502045).
1058
1059 -- Colin Watson <cjwatson@debian.org> Tue, 24 Nov 2015 22:48:53 +0000
1060
1061openssh (1:6.9p1-2) unstable; urgency=medium
1062
1063 [ Colin Watson ]
1064 * mention-ssh-keygen-on-keychange.patch: Move example ssh-keygen
1065 invocation onto a separate line to make it easier to copy and paste
1066 (LP: #1491532).
1067
1068 [ Tyler Hicks ]
1069 * Build with audit support on Linux (closes: #797727, LP: #1478087).
1070
1071 -- Colin Watson <cjwatson@debian.org> Thu, 10 Sep 2015 12:26:11 +0100
1072
1073openssh (1:6.9p1-1) unstable; urgency=medium
1074
1075 * New upstream release (http://www.openssh.com/txt/release-6.8):
1076 - sshd(8): UseDNS now defaults to 'no'. Configurations that match
1077 against the client host name (via sshd_config or authorized_keys) may
1078 need to re-enable it or convert to matching against addresses.
1079 - Add FingerprintHash option to ssh(1) and sshd(8), and equivalent
1080 command-line flags to the other tools to control algorithm used for
1081 key fingerprints. The default changes from MD5 to SHA256 and format
1082 from hex to base64.
1083 Fingerprints now have the hash algorithm prepended. An example of the
1084 new format: SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE
1085 Please note that visual host keys will also be different.
1086 - ssh(1), sshd(8): Experimental host key rotation support. Add a
1087 protocol extension for a server to inform a client of all its
1088 available host keys after authentication has completed. The client
1089 may record the keys in known_hosts, allowing it to upgrade to better
1090 host key algorithms and a server to gracefully rotate its keys.
1091 The client side of this is controlled by a UpdateHostkeys config
1092 option (default off).
1093 - ssh(1): Add a ssh_config HostbasedKeyType option to control which host
1094 public key types are tried during host-based authentication.
1095 - ssh(1), sshd(8): Fix connection-killing host key mismatch errors when
1096 sshd offers multiple ECDSA keys of different lengths.
1097 - ssh(1): When host name canonicalisation is enabled, try to parse host
1098 names as addresses before looking them up for canonicalisation. Fixes
1099 bz#2074 and avoids needless DNS lookups in some cases.
1100 - ssh(1), ssh-keysign(8): Make ed25519 keys work for host based
1101 authentication.
1102 - sshd(8): SSH protocol v.1 workaround for the Meyer, et al,
1103 Bleichenbacher Side Channel Attack. Fake up a bignum key before RSA
1104 decryption.
1105 - sshd(8): Remember which public keys have been used for authentication
1106 and refuse to accept previously-used keys. This allows
1107 AuthenticationMethods=publickey,publickey to require that users
1108 authenticate using two _different_ public keys.
1109 - sshd(8): add sshd_config HostbasedAcceptedKeyTypes and
1110 PubkeyAcceptedKeyTypes options to allow sshd to control what public
1111 key types will be accepted (closes: #481133). Currently defaults to
1112 all.
1113 - sshd(8): Don't count partial authentication success as a failure
1114 against MaxAuthTries.
1115 - ssh(1): Add RevokedHostKeys option for the client to allow text-file
1116 or KRL-based revocation of host keys.
1117 - ssh-keygen(1), sshd(8): Permit KRLs that revoke certificates by serial
1118 number or key ID without scoping to a particular CA.
1119 - ssh(1): Add a "Match canonical" criteria that allows ssh_config Match
1120 blocks to trigger only in the second config pass.
1121 - ssh(1): Add a -G option to ssh that causes it to parse its
1122 configuration and dump the result to stdout, similar to "sshd -T".
1123 - ssh(1): Allow Match criteria to be negated. E.g. "Match !host".
1124 - ssh-keyscan(1): ssh-keyscan has been made much more robust against
1125 servers that hang or violate the SSH protocol (closes: #241119).
1126 - ssh(1), ssh-keygen(1): Fix regression bz#2306: Key path names were
1127 being lost as comment fields (closes: #787776).
1128 - ssh(1): Allow ssh_config Port options set in the second config parse
1129 phase to be applied (they were being ignored; closes: #774369).
1130 - ssh(1): Tweak config re-parsing with host canonicalisation - make the
1131 second pass through the config files always run when host name
1132 canonicalisation is enabled (and not whenever the host name changes)
1133 - ssh(1): Fix passing of wildcard forward bind addresses when connection
1134 multiplexing is in use.
1135 - ssh-keygen(1): Fix broken private key conversion from non-OpenSSH
1136 formats.
1137 - ssh-keygen(1): Fix KRL generation bug when multiple CAs are in use.
1138 * New upstream release (http://www.openssh.com/txt/release-6.9):
1139 - CVE-2015-5352: ssh(1): When forwarding X11 connections with
1140 ForwardX11Trusted=no, connections made after ForwardX11Timeout expired
1141 could be permitted and no longer subject to XSECURITY restrictions
1142 because of an ineffective timeout check in ssh(1) coupled with "fail
1143 open" behaviour in the X11 server when clients attempted connections
1144 with expired credentials (closes: #790798). This problem was reported
1145 by Jann Horn.
1146 - SECURITY: ssh-agent(1): Fix weakness of agent locking (ssh-add -x) to
1147 password guessing by implementing an increasing failure delay, storing
1148 a salted hash of the password rather than the password itself and
1149 using a timing-safe comparison function for verifying unlock attempts.
1150 This problem was reported by Ryan Castellucci.
1151 - sshd(8): Support admin-specified arguments to AuthorizedKeysCommand
1152 (closes: #740494).
1153 - sshd(8): Add AuthorizedPrincipalsCommand that allows retrieving
1154 authorized principals information from a subprocess rather than a
1155 file.
1156 - ssh(1), ssh-add(1): Support PKCS#11 devices with external PIN entry
1157 devices.
1158 - ssh-keygen(1): Support "ssh-keygen -lF hostname" to search known_hosts
1159 and print key hashes rather than full keys.
1160 - ssh-agent(1): Add -D flag to leave ssh-agent in foreground without
1161 enabling debug mode.
1162 - ssh(1), sshd(8): Deprecate legacy SSH2_MSG_KEX_DH_GEX_REQUEST_OLD
1163 message and do not try to use it against some 3rd-party SSH
1164 implementations that use it (older PuTTY, WinSCP).
1165 - ssh(1), sshd(8): Cap DH-GEX group size at 4Kbits for Cisco
1166 implementations as some would fail when attempting to use group sizes
1167 >4K (closes: #740307, LP: #1287222).
1168 - ssh(1): Fix out-of-bound read in EscapeChar configuration option
1169 parsing.
1170 - sshd(8): Fix application of PermitTunnel, LoginGraceTime,
1171 AuthenticationMethods and StreamLocalBindMask options in Match blocks.
1172 - ssh(1), sshd(8): Improve disconnection message on TCP reset.
1173 - ssh(1): Remove failed remote forwards established by multiplexing from
1174 the list of active forwards.
1175 - sshd(8): Make parsing of authorized_keys "environment=" options
1176 independent of PermitUserEnv being enabled.
1177 - sshd(8): Fix post-auth crash with permitopen=none (closes: #778807).
1178 - ssh(1), ssh-add(1), ssh-keygen(1): Allow new-format private keys to be
1179 encrypted with AEAD ciphers.
1180 - ssh(1): Allow ListenAddress, Port and AddressFamily configuration
1181 options to appear in any order.
1182 - sshd(8): Check for and reject missing arguments for VersionAddendum
1183 and ForceCommand.
1184 - ssh(1), sshd(8): Don't treat unknown certificate extensions as fatal.
1185 - ssh-keygen(1): Make stdout and stderr output consistent.
1186 - ssh(1): Mention missing DISPLAY environment in debug log when X11
1187 forwarding requested.
1188 - sshd(8): Correctly record login when UseLogin is set.
1189 - sshd(8): Add some missing options to sshd -T output and fix output of
1190 VersionAddendum and HostCertificate.
1191 - Document and improve consistency of options that accept a "none"
1192 argument: TrustedUserCAKeys, RevokedKeys, AuthorizedPrincipalsFile.
1193 - ssh(1): Include remote username in debug output.
1194 - sshd(8): Avoid compatibility problem with some versions of Tera Term,
1195 which would crash when they received the hostkeys notification message
1196 (hostkeys-00@openssh.com).
1197 - sshd(8): Mention ssh-keygen -E as useful when comparing legacy MD5
1198 host key fingerprints.
1199 - ssh(1): Clarify pseudo-terminal request behaviour and make manual
1200 language consistent.
1201 - ssh(1): Document that the TERM environment variable is not subject to
1202 SendEnv and AcceptEnv; bz#2386
1203 - sshd(8): Format UsePAM setting when using sshd -T (closes: #767648).
1204 - moduli(5): Update DH-GEX moduli (closes: #787037).
1205 * There are some things I want to fix before upgrading to 7.0p1, though I
1206 intend to do that soon. In the meantime, backport some patches, mainly
1207 to fix security issues:
1208 - SECURITY: sshd(8): OpenSSH 6.8 and 6.9 incorrectly set TTYs to be
1209 world-writable. Local attackers may be able to write arbitrary
1210 messages to logged-in users, including terminal escape sequences.
1211 Reported by Nikolay Edigaryev.
1212 - SECURITY: sshd(8): Fixed a privilege separation weakness related to
1213 PAM support. Attackers who could successfully compromise the
1214 pre-authentication process for remote code execution and who had valid
1215 credentials on the host could impersonate other users. Reported by
1216 Moritz Jodeit.
1217 - SECURITY: sshd(8): Fixed a use-after-free bug related to PAM support
1218 that was reachable by attackers who could compromise the
1219 pre-authentication process for remote code execution (closes:
1220 #795711). Also reported by Moritz Jodeit.
1221 - CVE-2015-5600: sshd(8): Fix circumvention of MaxAuthTries using
1222 keyboard-interactive authentication (closes: #793616). By specifying
1223 a long, repeating keyboard-interactive "devices" string, an attacker
1224 could request the same authentication method be tried thousands of
1225 times in a single pass. The LoginGraceTime timeout in sshd(8) and any
1226 authentication failure delays implemented by the authentication
1227 mechanism itself were still applied. Found by Kingcope.
1228 - Let principals-command.sh work for noexec /var/run.
1229 * Thanks to Jakub Jelen of Red Hat for Fedora's rebased version of the
1230 GSSAPI key exchange patch.
1231 * Document the Debian-specific change to the default value of
1232 ForwardX11Trusted in ssh(1) (closes: #781469).
1233
1234 -- Colin Watson <cjwatson@debian.org> Thu, 20 Aug 2015 10:38:58 +0100
1235
1236openssh (1:6.7p1-6) unstable; urgency=medium
1237
1238 [ Martin Pitt ]
1239 * openssh-server.postinst: Quiesce "Unable to connect to Upstart" error
1240 message from initctl if upstart is installed, but not the current init
1241 system. (LP: #1440070)
1242 * openssh-server.postinst: Fix version comparisons of upgrade adjustments
1243 to not apply to fresh installs.
1244
1245 -- Colin Watson <cjwatson@debian.org> Sun, 19 Apr 2015 14:32:43 +0100
1246
1247openssh (1:6.7p1-5) unstable; urgency=medium
1248
1249 * Revert change from previous upload, which causes far more trouble than
1250 it is worth (closes: #780797):
1251 - Send/accept only specific known LC_* variables, rather than using a
1252 wildcard.
1253 * Add a NEWS.Debian entry documenting this reversion, as it is too
1254 difficult to undo the sshd_config change automatically without
1255 compounding the problem of (arguably) overwriting user configuration.
1256
1257 -- Colin Watson <cjwatson@debian.org> Sun, 22 Mar 2015 23:20:56 +0000
1258
1259openssh (1:6.7p1-4) unstable; urgency=medium
1260
1261 * Send/accept only specific known LC_* variables, rather than using a
1262 wildcard (closes: #765633).
1263 * Document interactions between ListenAddress/Port and ssh.socket in
1264 README.Debian (closes: #764842).
1265 * Debconf translations:
1266 - Brazilian Portuguese (thanks, José de Figueiredo; closes: #771859).
1267
1268 -- Colin Watson <cjwatson@debian.org> Wed, 18 Mar 2015 15:34:13 +0000
1269
1270openssh (1:6.7p1-3) unstable; urgency=medium
1271
1272 * Debconf translations:
1273 - Dutch (thanks, Frans Spiesschaert; closes: #765851).
1274 * Assume that dpkg-statoverride exists and drop the test for an obsolete
1275 compatibility path.
1276
1277 -- Colin Watson <cjwatson@debian.org> Mon, 03 Nov 2014 20:29:52 +0000
1278
1279openssh (1:6.7p1-2) unstable; urgency=medium
1280
1281 * debian/tests/control: Drop isolation-container, since the tests run on a
1282 high port. They're still not guaranteed to run correctly in an schroot,
1283 but may manage to work, so this lets the tests at least try to run on
1284 ci.debian.net.
1285
1286 -- Colin Watson <cjwatson@debian.org> Fri, 10 Oct 2014 10:47:19 +0100
1287
1288openssh (1:6.7p1-1) unstable; urgency=medium
1289
1290 * New upstream release (http://www.openssh.com/txt/release-6.7):
1291 - sshd(8): The default set of ciphers and MACs has been altered to
1292 remove unsafe algorithms. In particular, CBC ciphers and arcfour* are
1293 disabled by default. The full set of algorithms remains available if
1294 configured explicitly via the Ciphers and MACs sshd_config options.
1295 - ssh(1), sshd(8): Add support for Unix domain socket forwarding. A
1296 remote TCP port may be forwarded to a local Unix domain socket and
1297 vice versa or both ends may be a Unix domain socket (closes: #236718).
1298 - ssh(1), ssh-keygen(1): Add support for SSHFP DNS records for ED25519
1299 key types.
1300 - sftp(1): Allow resumption of interrupted uploads.
1301 - ssh(1): When rekeying, skip file/DNS lookups of the hostkey if it is
1302 the same as the one sent during initial key exchange.
1303 - sshd(8): Allow explicit ::1 and 127.0.0.1 forwarding bind addresses
1304 when GatewayPorts=no; allows client to choose address family.
1305 - sshd(8): Add a sshd_config PermitUserRC option to control whether
1306 ~/.ssh/rc is executed, mirroring the no-user-rc authorized_keys
1307 option.
1308 - ssh(1): Add a %C escape sequence for LocalCommand and ControlPath that
1309 expands to a unique identifier based on a hash of the tuple of (local
1310 host, remote user, hostname, port). Helps avoid exceeding miserly
1311 pathname limits for Unix domain sockets in multiplexing control paths.
1312 - sshd(8): Make the "Too many authentication failures" message include
1313 the user, source address, port and protocol in a format similar to the
1314 authentication success / failure messages.
1315 - Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC when it is
1316 available. It considers time spent suspended, thereby ensuring
1317 timeouts (e.g. for expiring agent keys) fire correctly (closes:
1318 #734553).
1319 - Use prctl() to prevent sftp-server from accessing
1320 /proc/self/{mem,maps}.
1321 * Restore TCP wrappers support, removed upstream in 6.7. It is true that
1322 dropping this reduces preauth attack surface in sshd. On the other
1323 hand, this support seems to be quite widely used, and abruptly dropping
1324 it (from the perspective of users who don't read openssh-unix-dev) could
1325 easily cause more serious problems in practice. It's not entirely clear
1326 what the right long-term answer for Debian is, but it at least probably
1327 doesn't involve dropping this feature shortly before a freeze.
1328 * Replace patch to disable OpenSSL version check with an updated version
1329 of Kurt Roeckx's patch from #732940 to just avoid checking the status
1330 field.
1331 * Build-depend on a new enough dpkg-dev for dpkg-buildflags, rather than
1332 simply a new enough dpkg.
1333 * Simplify debian/rules using /usr/share/dpkg/buildflags.mk.
1334 * Use Package-Type rather than XC-Package-Type, now that it is an official
1335 field.
1336 * Run a subset of the upstream regression test suite at package build
1337 time, and the rest of it under autopkgtest.
1338
1339 -- Colin Watson <cjwatson@debian.org> Thu, 09 Oct 2014 14:05:56 +0100
1340
1341openssh (1:6.6p1-8) unstable; urgency=medium
1342
1343 * Make the if-up hook use "reload" rather than "restart" if the system was
1344 booted using systemd (closes: #756547).
1345 * Show fingerprints of new keys after creating them in the postinst
1346 (closes: #762128).
1347 * Policy version 3.9.6: no changes required.
1348 * Don't link /usr/share/doc/ssh to openssh-client, as this is not safe
1349 between Architecture: all and Architecture: any binary packages (closes:
1350 #763375).
1351
1352 -- Colin Watson <cjwatson@debian.org> Fri, 03 Oct 2014 12:23:57 +0100
1353
1354openssh (1:6.6p1-7) unstable; urgency=medium
1355
1356 * Make sure that DEB_HOST_ARCH is set, even when invoking debian/rules
1357 directly.
1358 * Use dh-exec to simplify override_dh_install target.
1359 * Remove several unnecessary entries in debian/*.dirs.
1360 * Pass noupdate to the second call to pam_motd, not the first (thanks, Ken
1361 T Takusagawa; closes: #757059).
1362 * Debconf translations:
1363 - Turkish (thanks, Mert Dirik; closes: #756757).
1364
1365 -- Colin Watson <cjwatson@debian.org> Tue, 05 Aug 2014 09:10:04 +0100
1366
1367openssh (1:6.6p1-6) unstable; urgency=medium
1368
1369 * Upgrade to debhelper v9.
1370 * Only use pam_keyinit on Linux architectures (closes: #747245).
1371 * Make get_config_option more robust against trailing whitespace (thanks,
1372 LaMont Jones).
1373 * Debconf translations:
1374 - Czech (thanks, Michal Šimůnek; closes: #751419).
1375
1376 -- Colin Watson <cjwatson@debian.org> Sat, 28 Jun 2014 14:50:04 +0100
1377
1378openssh (1:6.6p1-5) unstable; urgency=medium
1379
1380 * Force ssh-agent Upstart job to use sh syntax regardless of the user's
1381 shell (thanks, Steffen Stempel; LP: #1312928).
1382
1383 -- Colin Watson <cjwatson@debian.org> Thu, 01 May 2014 16:27:53 +0100
1384
1385openssh (1:6.6p1-4) unstable; urgency=medium
1386
1387 * Debconf translations:
1388 - Spanish (thanks, Matías Bellone; closes: #744867).
1389 * Apply upstream-recommended patch to fix bignum encoding for
1390 curve25519-sha256@libssh.org, fixing occasional key exchange failures.
1391
1392 -- Colin Watson <cjwatson@debian.org> Mon, 21 Apr 2014 21:29:53 +0100
1393
1394openssh (1:6.6p1-3) unstable; urgency=medium
1395
1396 * Debconf translations:
1397 - French (thanks, Étienne Gilli; closes: #743242).
1398 * Never signal the service supervisor with SIGSTOP more than once, to
1399 prevent a hang on re-exec (thanks, Robie Basak; LP: #1306877).
1400
1401 -- Colin Watson <cjwatson@debian.org> Mon, 14 Apr 2014 12:11:50 +0100
1402
1403openssh (1:6.6p1-2) unstable; urgency=medium
1404
1405 * If no root password is set, then switch to "PermitRootLogin
1406 without-password" without asking (LP: #1300127).
1407
1408 -- Colin Watson <cjwatson@debian.org> Mon, 31 Mar 2014 12:20:46 +0100
1409
1410openssh (1:6.6p1-1) unstable; urgency=medium
1411
1412 [ Colin Watson ]
1413 * Apply various warning-suppression and regression-test fixes to
1414 gssapi.patch from Damien Miller.
1415 * New upstream release (http://www.openssh.com/txt/release-6.6,
1416 LP: #1298280):
1417 - CVE-2014-2532: sshd(8): when using environment passing with an
1418 sshd_config(5) AcceptEnv pattern with a wildcard, OpenSSH prior to 6.6
1419 could be tricked into accepting any environment variable that contains
1420 the characters before the wildcard character.
1421 * Re-enable btmp logging, as its permissions were fixed a long time ago in
1422 response to #370050 (closes: #341883).
1423 * Change to "PermitRootLogin without-password" for new installations, and
1424 ask a debconf question when upgrading systems with "PermitRootLogin yes"
1425 from previous versions (closes: #298138).
1426 * Debconf translations:
1427 - Danish (thanks, Joe Hansen).
1428 - Portuguese (thanks, Américo Monteiro).
1429 - Russian (thanks, Yuri Kozlov; closes: #742308).
1430 - Swedish (thanks, Andreas Rönnquist).
1431 - Japanese (thanks, victory).
1432 - German (thanks, Stephan Beck; closes: #742541).
1433 - Italian (thanks, Beatrice Torracca).
1434 * Don't start ssh-agent from the Upstart user session job if something
1435 like Xsession has already done so (based on work by Bruno Vasselle;
1436 LP: #1244736).
1437
1438 [ Matthew Vernon ]
1439 * CVE-2014-2653: Fix failure to check SSHFP records if server presents a
1440 certificate (bug reported by me, patch by upstream's Damien Miller;
1441 thanks also to Mark Wooding for his help in fixing this) (Closes:
1442 #742513)
1443
1444 -- Colin Watson <cjwatson@debian.org> Fri, 28 Mar 2014 18:04:41 +0000
1445
1446openssh (1:6.5p1-6) unstable; urgency=medium
1447
1448 * Fix Breaks/Replaces versions of openssh-sftp-server on openssh-server
1449 (thanks, Axel Beckert).
1450
1451 -- Colin Watson <cjwatson@debian.org> Thu, 06 Mar 2014 16:18:44 +0000
1452
1453openssh (1:6.5p1-5) unstable; urgency=medium
1454
1455 [ Colin Watson ]
1456 * Add Alias=sshd.service to systemd ssh.service file, to match "Provides:
1457 sshd" in the sysvinit script (thanks, Michael Biebl).
1458 * Add Before=ssh.service to systemd ssh.socket file, since otherwise
1459 nothing guarantees that ssh.service has stopped before ssh.socket starts
1460 (thanks, Uoti Urpala).
1461
1462 [ Axel Beckert ]
1463 * Split sftp-server into its own package to allow it to also be used by
1464 other SSH server implementations like dropbear (closes: #504290).
1465
1466 -- Colin Watson <cjwatson@debian.org> Wed, 05 Mar 2014 13:53:08 +0000
1467
1468openssh (1:6.5p1-4) unstable; urgency=medium
1469
1470 * Configure --without-hardening on hppa, to work around
1471 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155 (closes: #738798).
1472 * Amend "Running sshd from inittab" instructions in README.Debian to
1473 recommend 'update-rc.d ssh disable', rather than manual removal of rc*.d
1474 symlinks that won't work with dependency-based sysv-rc.
1475 * Remove code related to non-dependency-based sysv-rc ordering, since that
1476 is no longer supported.
1477 * Apply patch from https://bugzilla.mindrot.org/show_bug.cgi?id=2200 to
1478 fix getsockname errors when using "ssh -W" (closes: #738693).
1479
1480 -- Colin Watson <cjwatson@debian.org> Sat, 15 Feb 2014 02:19:36 +0000
1481
1482openssh (1:6.5p1-3) unstable; urgency=medium
1483
1484 * Clarify socket activation mode in README.Debian, as suggested by Uoti
1485 Urpala.
1486 * Stop claiming that "Protocol 2" is a Debian-specific default; this has
1487 been upstream's default since 5.4p1.
1488 * Avoid stdout noise from which(1) on purge of openssh-client.
1489 * Fix sysvinit->systemd transition code to cope with still-running
1490 sysvinit jobs being considered active by systemd (thanks, Uoti Urpala
1491 and Michael Biebl).
1492 * Bump guard version for sysvinit->systemd transition to 1:6.5p1-3; we may
1493 have got it wrong before, and it's fairly harmless to repeat it.
1494 * Remove tests for whether /dev/null is a character device from the
1495 Upstart job and the systemd service files; it's there to avoid a
1496 confusing failure mode in daemon(), but with modern init systems we use
1497 the -D option to suppress daemonisation anyway.
1498 * Refer to /usr/share/common-licenses/GPL-2 in debian/copyright (for the
1499 Debian patch) rather than plain GPL.
1500 * Drop some very old Conflicts and Replaces (ssh (<< 1:3.8.1p1-9),
1501 rsh-client (<< 0.16.1-1), ssh-krb5 (<< 1:4.3p2-7), ssh-nonfree (<< 2),
1502 and openssh-client (<< 1:3.8.1p1-11)). These all relate to pre-etch
1503 versions, for which we no longer have maintainer script code, and per
1504 policy they would have to become Breaks nowadays anyway.
1505 * Policy version 3.9.5.
1506 * Drop unnecessary -1 in zlib1g Build-Depends version.
1507 * Tweak dh_systemd_enable invocations to avoid lots of error noise.
1508
1509 -- Colin Watson <cjwatson@debian.org> Wed, 12 Feb 2014 13:10:08 +0000
1510
1511openssh (1:6.5p1-2) unstable; urgency=medium
1512
1513 * Only enable ssh.service for systemd, not both ssh.service and
1514 ssh.socket. Thanks to Michael Biebl for spotting this.
1515 * Backport upstream patch to unbreak case-sensitive matching of ssh_config
1516 (closes: #738619).
1517
1518 -- Colin Watson <cjwatson@debian.org> Tue, 11 Feb 2014 11:28:35 +0000
1519
1520openssh (1:6.5p1-1) unstable; urgency=medium
1521
1522 * New upstream release (http://www.openssh.com/txt/release-6.5,
1523 LP: #1275068):
1524 - ssh(1): Add support for client-side hostname canonicalisation using a
1525 set of DNS suffixes and rules in ssh_config(5). This allows
1526 unqualified names to be canonicalised to fully-qualified domain names
1527 to eliminate ambiguity when looking up keys in known_hosts or checking
1528 host certificate names (closes: #115286).
1529 * Switch to git; adjust Vcs-* fields.
1530 * Convert to git-dpm, and drop source package documentation associated
1531 with the old bzr/quilt patch handling workflow.
1532 * Drop ssh-vulnkey and the associated ssh/ssh-add/sshd integration code,
1533 leaving only basic configuration file compatibility, since it has been
1534 nearly six years since the original vulnerability and this code is not
1535 likely to be of much value any more (closes: #481853, #570651). See
1536 https://lists.debian.org/debian-devel/2013/09/msg00240.html for my full
1537 reasoning.
1538 * Add OpenPGP signature checking configuration to watch file (thanks,
1539 Daniel Kahn Gillmor; closes: #732441).
1540 * Add the pam_keyinit session module, to create a new session keyring on
1541 login (closes: #734816).
1542 * Incorporate default path changes from shadow 1:4.0.18.1-8, removing
1543 /usr/bin/X11 (closes: #644521).
1544 * Generate ED25519 host keys on fresh installations. Upgraders who wish
1545 to add such host keys should manually add 'HostKey
1546 /etc/ssh/ssh_host_ed25519_key' to /etc/ssh/sshd_config and run
1547 'ssh-keygen -q -f /etc/ssh/ssh_host_ed25519_key -N "" -t ed25519'.
1548 * Drop long-obsolete "SSH now uses protocol 2 by default" section from
1549 README.Debian.
1550 * Add systemd support (thanks, Sven Joachim; closes: #676830).
1551
1552 -- Colin Watson <cjwatson@debian.org> Mon, 10 Feb 2014 14:58:26 +0000
1553
1554openssh (1:6.4p1-2) unstable; urgency=high
1555
1556 * Increase ServerKeyBits value in package-generated sshd_config to 1024
1557 (closes: #727622, LP: #1244272).
1558 * Restore patch to disable OpenSSL version check (closes: #732940).
1559
1560 -- Colin Watson <cjwatson@debian.org> Mon, 23 Dec 2013 10:44:04 +0000
1561
1562openssh (1:6.4p1-1) unstable; urgency=high
1563
1564 * New upstream release. Important changes:
1565 - 6.3/6.3p1 (http://www.openssh.com/txt/release-6.3):
1566 + sftp(1): add support for resuming partial downloads using the
1567 "reget" command and on the sftp commandline or on the "get"
1568 commandline using the "-a" (append) option (closes: #158590).
1569 + ssh(1): add an "IgnoreUnknown" configuration option to selectively
1570 suppress errors arising from unknown configuration directives
1571 (closes: #436052).
1572 + sftp(1): update progressmeter when data is acknowledged, not when
1573 it's sent (partially addresses #708372).
1574 + ssh(1): do not fatally exit when attempting to cleanup multiplexing-
1575 created channels that are incompletely opened (closes: #651357).
1576 - 6.4/6.4p1 (http://www.openssh.com/txt/release-6.4):
1577 + CVE-2013-4548: sshd(8): fix a memory corruption problem triggered
1578 during rekeying when an AES-GCM cipher is selected (closes:
1579 #729029). Full details of the vulnerability are available at:
1580 http://www.openssh.com/txt/gcmrekey.adv
1581 * When running under Upstart, only consider the daemon started once it is
1582 ready to accept connections (by raising SIGSTOP at that point and using
1583 "expect stop").
1584
1585 -- Colin Watson <cjwatson@debian.org> Sat, 09 Nov 2013 18:24:16 +0000
1586
1587openssh (1:6.2p2-6) unstable; urgency=low
1588
1589 * Update config.guess and config.sub automatically at build time.
1590 dh_autoreconf does not take care of that by default because openssh does
1591 not use automake.
1592
1593 -- Colin Watson <cjwatson@debian.org> Tue, 02 Jul 2013 22:54:49 +0100
1594
1595openssh (1:6.2p2-5) unstable; urgency=low
1596
1597 [ Colin Watson ]
1598 * Document consequences of ssh-agent being setgid in ssh-agent(1); see
1599 #711623.
1600 * Use 'set -e' rather than '#! /bin/sh -e' in maintainer scripts and
1601 ssh-argv0.
1602
1603 [ Yolanda Robla ]
1604 * debian/rules: Include real distribution in SSH_EXTRAVERSION instead of
1605 hardcoding Debian (LP: #1195342).
1606
1607 -- Colin Watson <cjwatson@debian.org> Thu, 27 Jun 2013 15:24:14 +0100
1608
1609openssh (1:6.2p2-4) unstable; urgency=low
1610
1611 * Fix non-portable shell in ssh-copy-id (closes: #711162).
1612 * Rebuild against debhelper 9.20130604 with fixed dependencies for
1613 invoke-rc.d and Upstart jobs (closes: #711159, #711364).
1614 * Set SELinux context on private host keys as well as public host keys
1615 (closes: #687436).
1616
1617 -- Colin Watson <cjwatson@debian.org> Thu, 06 Jun 2013 17:06:31 +0100
1618
1619openssh (1:6.2p2-3) unstable; urgency=low
1620
1621 * If the running init daemon is Upstart, then, on the first upgrade to
1622 this version, check whether sysvinit is still managing sshd; if so,
1623 manually stop it so that it can be restarted under upstart. We do this
1624 near the end of the postinst, so it shouldn't result in any appreciable
1625 extra window where sshd is not running during upgrade.
1626
1627 -- Colin Watson <cjwatson@debian.org> Wed, 22 May 2013 17:42:10 +0100
1628
1629openssh (1:6.2p2-2) unstable; urgency=low
1630
1631 * Change start condition of Upstart job to be just the standard "runlevel
1632 [2345]", rather than "filesystem or runlevel [2345]"; the latter makes
1633 it unreasonably difficult to ensure that urandom starts before ssh, and
1634 is not really necessary since one of static-network-up and failsafe-boot
1635 is guaranteed to happen and will trigger entry to the default runlevel,
1636 and we don't care about ssh starting before the network (LP: #1098299).
1637 * Drop conffile handling for direct upgrades from pre-split ssh package;
1638 this was originally added in 1:4.3p2-7 / 1:4.3p2-8, and contained a
1639 truly ghastly hack around a misbehaviour in sarge's dpkg. Since this is
1640 now four Debian releases ago, we can afford to drop this and simplify
1641 the packaging.
1642 * Remove ssh/use_old_init_script, which was a workaround for a very old
1643 bug in /etc/init.d/ssh. If anyone has ignored this for >10 years then
1644 they aren't going to be convinced now (closes: #214182).
1645 * Remove support for upgrading directly from ssh-nonfree.
1646 * Remove lots of maintainer script support for direct upgrades from
1647 pre-etch (three releases before current stable).
1648 * Add #DEBHELPER# tokens to openssh-client.postinst and
1649 openssh-server.postinst.
1650 * Replace old manual conffile handling code with dpkg-maintscript-helper,
1651 via dh_installdeb.
1652 * Switch to new unified layout for Upstart jobs as documented in
1653 https://wiki.ubuntu.com/UpstartCompatibleInitScripts: the init script
1654 checks for a running Upstart, and we now let dh_installinit handle most
1655 of the heavy lifting in maintainer scripts. Ubuntu users should be
1656 essentially unaffected except that sshd may no longer start
1657 automatically in chroots if the running Upstart predates 0.9.0; but the
1658 main goal is simply not to break when openssh-server is installed in a
1659 chroot.
1660 * Remove the check for vulnerable host keys; this was first added five
1661 years ago, and everyone should have upgraded through a version that
1662 applied these checks by now. The ssh-vulnkey tool and the blacklisting
1663 support in sshd are still here, at least for the moment.
1664 * This removes the last of our uses of debconf (closes: #221531).
1665 * Use the pam_loginuid session module (thanks, Laurent Bigonville; closes:
1666 #677440, LP: #1067779).
1667 * Bracket our session stack with calls to pam_selinux close/open (thanks,
1668 Laurent Bigonville; closes: #679458).
1669 * Fix dh_builddeb invocation so that we really use xz compression for
1670 binary packages, as intended since 1:6.1p1-2.
1671
1672 -- Colin Watson <cjwatson@debian.org> Wed, 22 May 2013 09:07:42 +0100
1673
1674openssh (1:6.2p2-1) unstable; urgency=low
1675
1676 * New upstream release (http://www.openssh.com/txt/release-6.2p2):
1677 - Only warn for missing identity files that were explicitly specified
1678 (closes: #708275).
1679 - Fix bug in contributed contrib/ssh-copy-id script that could result in
1680 "rm *" being called on mktemp failure (closes: #708419).
1681
1682 -- Colin Watson <cjwatson@debian.org> Thu, 16 May 2013 14:05:06 +0100
1683
1684openssh (1:6.2p1-3) unstable; urgency=low
1685
1686 * Renumber Debian-specific additions to enum monitor_reqtype so that they
1687 fit within a single byte (thanks, Jason Conti; LP: #1179202).
1688
1689 -- Colin Watson <cjwatson@debian.org> Mon, 13 May 2013 10:56:04 +0100
1690
1691openssh (1:6.2p1-2) unstable; urgency=low
1692
1693 * Fix build failure on Ubuntu:
1694 - Include openbsd-compat/sys-queue.h from consolekit.c.
1695 - Fix consolekit mismerges in monitor.c and monitor_wrap.c.
1696
1697 -- Colin Watson <cjwatson@debian.org> Thu, 09 May 2013 09:45:57 +0100
1698
1699openssh (1:6.2p1-1) unstable; urgency=low
1700
1701 * New upstream release (http://www.openssh.com/txt/release-6.2).
1702 - Add support for multiple required authentication in SSH protocol 2 via
1703 an AuthenticationMethods option (closes: #195716).
1704 - Fix Sophie Germain formula in moduli(5) (closes: #698612).
1705 - Update ssh-copy-id to Phil Hands' greatly revised version (closes:
1706 #99785, #322228, #620428; LP: #518883, #835901, #1074798).
1707 * Use dh-autoreconf.
1708
1709 -- Colin Watson <cjwatson@debian.org> Tue, 07 May 2013 11:48:16 +0100
1710
1711openssh (1:6.1p1-4) experimental; urgency=low
1712
1713 [ Gunnar Hjalmarsson ]
1714 * debian/openssh-server.sshd.pam: Explicitly state that ~/.pam_environment
1715 should be read, and move the pam_env calls from "auth" to "session" so
1716 that it's also read when $HOME is encrypted (LP: #952185).
1717
1718 [ Stéphane Graber ]
1719 * Add ssh-agent upstart user job. This implements something similar to
1720 the 90x11-common_ssh-agent Xsession script. That is, start ssh-agent
1721 and set the appropriate environment variables (closes: #703906).
1722
1723 -- Colin Watson <cjwatson@debian.org> Mon, 25 Mar 2013 16:58:04 +0000
1724
1725openssh (1:6.1p1-3) experimental; urgency=low
1726
1727 * Give ssh and ssh-krb5 versioned dependencies on openssh-client and
1728 openssh-server, to try to reduce confusion when people run 'apt-get
1729 install ssh' or similar and expect that to upgrade everything relevant.
1730 * CVE-2010-5107: Improve DoS resistance by changing default of MaxStartups
1731 to 10:30:100 (closes: #700102).
1732
1733 -- Colin Watson <cjwatson@debian.org> Fri, 08 Feb 2013 21:07:31 +0000
1734
1735openssh (1:6.1p1-2) experimental; urgency=low
1736
1737 * Use xz compression for binary packages.
1738 * Merge from Ubuntu:
1739 - Add support for registering ConsoleKit sessions on login. (This is
1740 currently enabled only when building for Ubuntu.)
1741 - Drop openssh-blacklist and openssh-blacklist-extra to Suggests. It's
1742 been long enough since the relevant vulnerability that we shouldn't
1743 need these installed by default nowadays.
1744 - Add an Upstart job (not currently used by default in Debian).
1745 - Add mention of ssh-keygen in ssh connect warning (Scott Moser).
1746 - Install apport hooks.
1747 * Only build with -j if DEB_BUILD_OPTIONS=parallel=* is used (closes:
1748 #694282).
1749
1750 -- Colin Watson <cjwatson@debian.org> Mon, 26 Nov 2012 16:39:07 +0000
1751
1752openssh (1:6.1p1-1) experimental; urgency=low
1753
1754 * New upstream release (http://www.openssh.com/txt/release-6.1).
1755 - Enable pre-auth sandboxing by default for new installs.
1756 - Allow "PermitOpen none" to refuse all port-forwarding requests
1757 (closes: #543683).
1758
1759 -- Colin Watson <cjwatson@debian.org> Fri, 07 Sep 2012 00:22:44 +0100
1760
1761openssh (1:6.0p1-3) unstable; urgency=low
1762
1763 * debconf template translations:
1764 - Add Indonesian (thanks, Andika Triwidada; closes: #681670).
1765 * Call restorecon on copied ~/.ssh/authorized_keys if possible, since some
1766 SELinux policies require this (closes: #658675).
1767 * Add ncurses-term to openssh-server's Recommends, since it's often needed
1768 to support unusual terminal emulators on clients (closes: #675362).
1769
1770 -- Colin Watson <cjwatson@debian.org> Fri, 24 Aug 2012 06:55:36 +0100
1771
1772openssh (1:6.0p1-2) unstable; urgency=low
1773
1774 * Tighten libssl1.0.0 and libcrypto1.0.0-udeb dependencies to the current
1775 "fix" version at build time (closes: #678661).
1776
1777 -- Colin Watson <cjwatson@debian.org> Sun, 24 Jun 2012 12:16:06 +0100
1778
1779openssh (1:6.0p1-1) unstable; urgency=low
1780
1781 [ Roger Leigh ]
1782 * Display dynamic part of MOTD from /run/motd.dynamic, if it exists
1783 (closes: #669699).
1784
1785 [ Colin Watson ]
1786 * Update OpenSSH FAQ to revision 1.113, fixing missing line break (closes:
1787 #669667).
1788 * New upstream release (closes: #671010,
1789 http://www.openssh.com/txt/release-6.0).
1790 - Fix IPQoS not being set on non-mapped v4-in-v6 addressed connections
1791 (closes: #643312, #650512, #671075).
1792 - Add a new privilege separation sandbox implementation for Linux's new
1793 seccomp sandbox, automatically enabled on platforms that support it.
1794 (Note: privilege separation sandboxing is still experimental.)
1795 * Fix a bashism in configure's seccomp_filter check.
1796 * Add a sandbox fallback mechanism, so that behaviour on Linux depends on
1797 whether the running system's kernel has seccomp_filter support, not the
1798 build system's kernel (forwarded upstream as
1799 https://bugzilla.mindrot.org/show_bug.cgi?id=2011).
1800
1801 -- Colin Watson <cjwatson@debian.org> Sat, 26 May 2012 13:48:14 +0100
1802
1803openssh (1:5.9p1-5) unstable; urgency=low
1804
1805 * Use dpkg-buildflags, including for hardening support; drop use of
1806 hardening-includes.
1807 * Fix cross-building:
1808 - Allow using a cross-architecture pkg-config.
1809 - Pass default LDFLAGS to contrib/Makefile.
1810 - Allow dh_strip to strip gnome-ssh-askpass, rather than calling
1811 'install -s'.
1812
1813 -- Colin Watson <cjwatson@debian.org> Mon, 02 Apr 2012 11:20:33 +0100
1814
1815openssh (1:5.9p1-4) unstable; urgency=low
1816
1817 * Disable OpenSSL version check again, as its SONAME is sufficient
1818 nowadays (closes: #664383).
1819
1820 -- Colin Watson <cjwatson@debian.org> Mon, 19 Mar 2012 11:06:30 +0000
1821
1822openssh (1:5.9p1-3) unstable; urgency=low
1823
1824 * debconf template translations:
1825 - Update Polish (thanks, Michał Kułach; closes: #659829).
1826 * Ignore errors writing to console in init script (closes: #546743).
1827 * Move ssh-krb5 to Section: oldlibs.
1828
1829 -- Colin Watson <cjwatson@debian.org> Fri, 24 Feb 2012 08:56:18 +0000
1830
1831openssh (1:5.9p1-2) unstable; urgency=low
1832
1833 * Mark openssh-client and openssh-server as Multi-Arch: foreign.
1834
1835 -- Colin Watson <cjwatson@debian.org> Wed, 09 Nov 2011 02:06:48 +0000
1836
1837openssh (1:5.9p1-1) unstable; urgency=low
1838
1839 * New upstream release (http://www.openssh.com/txt/release-5.9).
1840 - Introduce sandboxing of the pre-auth privsep child using an optional
1841 sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables
1842 mandatory restrictions on the syscalls the privsep child can perform.
1843 - Add new SHA256-based HMAC transport integrity modes from
1844 http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt.
1845 - The pre-authentication sshd(8) privilege separation slave process now
1846 logs via a socket shared with the master process, avoiding the need to
1847 maintain /dev/log inside the chroot (closes: #75043, #429243,
1848 #599240).
1849 - ssh(1) now warns when a server refuses X11 forwarding (closes:
1850 #504757).
1851 - sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths,
1852 separated by whitespace (closes: #76312). The authorized_keys2
1853 fallback is deprecated but documented (closes: #560156).
1854 - ssh(1) and sshd(8): set IPv6 traffic class from IPQoS, as well as IPv4
1855 ToS/DSCP (closes: #498297).
1856 - ssh-add(1) now accepts keys piped from standard input. E.g. "ssh-add
1857 - < /path/to/key" (closes: #229124).
1858 - Clean up lost-passphrase text in ssh-keygen(1) (closes: #444691).
1859 - Say "required" rather than "recommended" in unprotected-private-key
1860 warning (LP: #663455).
1861 * Update OpenSSH FAQ to revision 1.112.
1862
1863 -- Colin Watson <cjwatson@debian.org> Wed, 07 Sep 2011 23:46:00 +0100
1864
1865openssh (1:5.8p1-7) unstable; urgency=low
1866
1867 * Only recommend ssh-import-id when built on Ubuntu (closes: #635887).
1868 * Use 'dpkg-vendor --derives-from Ubuntu' to detect Ubuntu systems rather
1869 than 'lsb_release -is' so that Ubuntu derivatives behave the same way as
1870 Ubuntu itself.
1871
1872 -- Colin Watson <cjwatson@debian.org> Fri, 29 Jul 2011 14:27:52 +0100
1873
1874openssh (1:5.8p1-6) unstable; urgency=low
1875
1876 * openssh-client and openssh-server Suggests: monkeysphere.
1877 * Quieten logs when multiple from= restrictions are used in different
1878 authorized_keys lines for the same key; it's still not ideal, but at
1879 least you'll only get one log entry per key (closes: #630606).
1880 * Merge from Ubuntu (Dustin Kirkland):
1881 - openssh-server Recommends: ssh-import-id (no-op in Debian since that
1882 package doesn't exist there, but this reduces the Ubuntu delta).
1883
1884 -- Colin Watson <cjwatson@debian.org> Thu, 28 Jul 2011 17:10:18 +0100
1885
1886openssh (1:5.8p1-5) unstable; urgency=low
1887
1888 * Drop openssh-server's dependency on openssh-blacklist to a
1889 recommendation (closes: #622604).
1890 * Update Vcs-* fields and README.source for Alioth changes.
1891 * Backport from upstream:
1892 - Make hostbased auth with ECDSA keys work correctly (closes: #633368).
1893
1894 -- Colin Watson <cjwatson@debian.org> Sun, 24 Jul 2011 11:06:47 +0100
1895
1896openssh (1:5.8p1-4) unstable; urgency=low
1897
1898 * Drop hardcoded dependencies on libssl0.9.8 and libcrypto0.9.8-udeb,
1899 since the required minimum versions are rather old now anyway and
1900 openssl has bumped its SONAME (thanks, Julien Cristau; closes: #620828).
1901 * Remove unreachable code from openssh-server.postinst.
1902
1903 -- Colin Watson <cjwatson@debian.org> Mon, 04 Apr 2011 15:56:18 +0100
1904
1905openssh (1:5.8p1-3) unstable; urgency=low
1906
1907 * Correct ssh-keygen instruction in the changelog for 1:5.7p1-1 (thanks,
1908 Joel Stanley).
1909 * Allow ssh-add to read from FIFOs (thanks, Daniel Kahn Gillmor; closes:
1910 #614897).
1911
1912 -- Colin Watson <cjwatson@debian.org> Fri, 18 Mar 2011 16:42:42 +0000
1913
1914openssh (1:5.8p1-2) unstable; urgency=low
1915
1916 * Upload to unstable.
1917
1918 -- Colin Watson <cjwatson@debian.org> Tue, 08 Feb 2011 10:59:17 +0000
1919
1920openssh (1:5.8p1-1) experimental; urgency=low
1921
1922 * New upstream release (http://www.openssh.com/txt/release-5.8):
1923 - Fix stack information leak in legacy certificate signing
1924 (http://www.openssh.com/txt/legacy-cert.adv).
1925
1926 -- Colin Watson <cjwatson@debian.org> Sat, 05 Feb 2011 11:13:11 +0000
1927
1928openssh (1:5.7p1-2) experimental; urgency=low
1929
1930 * Fix crash in ssh_selinux_setfscreatecon when SELinux is disabled
1931 (LP: #708571).
1932
1933 -- Colin Watson <cjwatson@debian.org> Thu, 27 Jan 2011 12:14:17 +0000
1934
1935openssh (1:5.7p1-1) experimental; urgency=low
1936
1937 * New upstream release (http://www.openssh.com/txt/release-5.7):
1938 - Implement Elliptic Curve Cryptography modes for key exchange (ECDH)
1939 and host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA
1940 offer better performance than plain DH and DSA at the same equivalent
1941 symmetric key length, as well as much shorter keys.
1942 - sftp(1)/sftp-server(8): add a protocol extension to support a hard
1943 link operation. It is available through the "ln" command in the
1944 client. The old "ln" behaviour of creating a symlink is available
1945 using its "-s" option or through the preexisting "symlink" command.
1946 - scp(1): Add a new -3 option to scp: Copies between two remote hosts
1947 are transferred through the local host (closes: #508613).
1948 - ssh(1): "atomically" create the listening mux socket by binding it on
1949 a temporary name and then linking it into position after listen() has
1950 succeeded. This allows the mux clients to determine that the server
1951 socket is either ready or stale without races (closes: #454784).
1952 Stale server sockets are now automatically removed (closes: #523250).
1953 - ssh(1): install a SIGCHLD handler to reap expired child process
1954 (closes: #594687).
1955 - ssh(1)/ssh-agent(1): honour $TMPDIR for client xauth and ssh-agent
1956 temporary directories (closes: #357469, although only if you arrange
1957 for ssh-agent to actually see $TMPDIR since the setgid bit will cause
1958 it to be stripped off).
1959 * Update to current GSSAPI patch from
1960 http://www.sxw.org.uk/computing/patches/openssh-5.7p1-gsskex-all-20110125.patch:
1961 - Add GSSAPIServerIdentity option.
1962 * Generate ECDSA host keys on fresh installations. Upgraders who wish to
1963 add such host keys should manually add 'HostKey
1964 /etc/ssh/ssh_host_ecdsa_key' to /etc/ssh/sshd_config and run 'ssh-keygen
1965 -q -f /etc/ssh/ssh_host_ecdsa_key -N "" -t ecdsa'.
1966 * Build-depend on libssl-dev (>= 0.9.8g) to ensure sufficient ECC support.
1967 * Backport SELinux build fix from CVS.
1968 * Rearrange selinux-role.patch so that it links properly given this
1969 SELinux build fix.
1970
1971 -- Colin Watson <cjwatson@debian.org> Wed, 26 Jan 2011 23:48:02 +0000
1972
1973openssh (1:5.6p1-3) experimental; urgency=low
1974
1975 * Drop override for desktop-file-but-no-dh_desktop-call, which Lintian no
1976 longer issues.
1977 * Merge 1:5.5p1-6.
1978
1979 -- Colin Watson <cjwatson@debian.org> Thu, 30 Dec 2010 11:48:00 +0000
1980
1981openssh (1:5.6p1-2) experimental; urgency=low
1982
1983 * Backport upstream patch to install a SIGCHLD handler to reap expired ssh
1984 child processes, preventing lots of zombies when using ControlPersist
1985 (closes: #594687).
1986
1987 -- Colin Watson <cjwatson@debian.org> Tue, 26 Oct 2010 14:46:40 +0100
1988
1989openssh (1:5.6p1-1) experimental; urgency=low
1990
1991 * New upstream release (http://www.openssh.com/txt/release-5.6):
1992 - Added a ControlPersist option to ssh_config(5) that automatically
1993 starts a background ssh(1) multiplex master when connecting. This
1994 connection can stay alive indefinitely, or can be set to automatically
1995 close after a user-specified duration of inactivity (closes: #335697,
1996 #350898, #454787, #500573, #550262).
1997 - Support AuthorizedKeysFile, AuthorizedPrincipalsFile,
1998 HostbasedUsesNameFromPacketOnly, and PermitTunnel in sshd_config(5)
1999 Match blocks (closes: #549858).
2000 - sftp(1): fix ls in working directories that contain globbing
2001 characters in their pathnames (LP: #530714).
2002
2003 -- Colin Watson <cjwatson@debian.org> Tue, 24 Aug 2010 00:37:54 +0100
2004
2005openssh (1:5.5p1-6) unstable; urgency=low
2006
2007 * Touch /var/run/sshd/.placeholder in the preinst so that /var/run/sshd,
2008 which is intentionally no longer shipped in the openssh-server package
2009 due to /var/run often being a temporary directory, is not removed on
2010 upgrade (closes: #575582).
2011
2012 -- Colin Watson <cjwatson@debian.org> Sun, 26 Dec 2010 18:09:29 +0000
2013
2014openssh (1:5.5p1-5) unstable; urgency=low
2015
2016 * Use an architecture wildcard for libselinux1-dev (closes: #591740).
2017 * debconf template translations:
2018 - Update Danish (thanks, Joe Hansen; closes: #592800).
2019
2020 -- Colin Watson <cjwatson@debian.org> Mon, 23 Aug 2010 22:59:03 +0100
2021
2022openssh (1:5.5p1-4) unstable; urgency=low
2023
2024 [ Sebastian Andrzej Siewior ]
2025 * Add powerpcspe to architecture list for libselinux1-dev build-dependency
2026 (closes: #579843).
2027
2028 [ Colin Watson ]
2029 * Allow ~/.ssh/authorized_keys and other secure files to be
2030 group-writable, provided that the group in question contains only the
2031 file's owner; this extends a patch previously applied to ~/.ssh/config
2032 (closes: #581919).
2033 * Check primary group memberships as well as supplementary group
2034 memberships, and only allow group-writability by groups with exactly one
2035 member, as zero-member groups are typically used by setgid binaries
2036 rather than being user-private groups (closes: #581697).
2037
2038 -- Colin Watson <cjwatson@debian.org> Sat, 22 May 2010 23:37:20 +0100
2039
2040openssh (1:5.5p1-3) unstable; urgency=low
2041
2042 * Discard error messages while checking whether rsh, rlogin, and rcp
2043 alternatives exist (closes: #579285).
2044 * Drop IDEA key check; I don't think it works properly any more due to
2045 textual changes in error output, it's only relevant for direct upgrades
2046 from truly ancient versions, and it breaks upgrades if
2047 /etc/ssh/ssh_host_key can't be loaded (closes: #579570).
2048
2049 -- Colin Watson <cjwatson@debian.org> Wed, 28 Apr 2010 22:12:47 +0100
2050
2051openssh (1:5.5p1-2) unstable; urgency=low
2052
2053 * Use dh_installinit -n, since our maintainer scripts already handle this
2054 more carefully (thanks, Julien Cristau).
2055
2056 -- Colin Watson <cjwatson@debian.org> Sat, 17 Apr 2010 12:55:56 +0100
2057
2058openssh (1:5.5p1-1) unstable; urgency=low
2059
2060 * New upstream release:
2061 - Unbreak sshd_config's AuthorizedKeysFile option for $HOME-relative
2062 paths.
2063 - Include a language tag when sending a protocol 2 disconnection
2064 message.
2065 - Make logging of certificates used for user authentication more clear
2066 and consistent between CAs specified using TrustedUserCAKeys and
2067 authorized_keys.
2068
2069 -- Colin Watson <cjwatson@debian.org> Fri, 16 Apr 2010 10:27:30 +0100
2070
2071openssh (1:5.4p1-2) unstable; urgency=low
2072
2073 * Borrow patch from Fedora to add DNSSEC support: if glibc 2.11 is
2074 installed, the host key is published in an SSHFP RR secured with DNSSEC,
2075 and VerifyHostKeyDNS=yes, then ssh will no longer prompt for host key
2076 verification (closes: #572049).
2077 * Convert to dh(1), and use dh_installdocs --link-doc.
2078 * Drop lpia support, since Ubuntu no longer supports this architecture.
2079 * Use dh_install more effectively.
2080 * Add a NEWS.Debian entry about changes in smartcard support relative to
2081 previous unofficial builds (closes: #231472).
2082
2083 -- Colin Watson <cjwatson@debian.org> Sat, 10 Apr 2010 01:08:59 +0100
2084
2085openssh (1:5.4p1-1) unstable; urgency=low
2086
2087 * New upstream release (LP: #535029).
2088 - After a transition period of about 10 years, this release disables SSH
2089 protocol 1 by default. Clients and servers that need to use the
2090 legacy protocol must explicitly enable it in ssh_config / sshd_config
2091 or on the command-line.
2092 - Remove the libsectok/OpenSC-based smartcard code and add support for
2093 PKCS#11 tokens. This support is enabled by default in the Debian
2094 packaging, since it now doesn't involve additional library
2095 dependencies (closes: #231472, LP: #16918).
2096 - Add support for certificate authentication of users and hosts using a
2097 new, minimal OpenSSH certificate format (closes: #482806).
2098 - Added a 'netcat mode' to ssh(1): "ssh -W host:port ...".
2099 - Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian
2100 package, this overlaps with the key blacklisting facility added in
2101 openssh 1:4.7p1-9, but with different file formats and slightly
2102 different scopes; for the moment, I've roughly merged the two.)
2103 - Various multiplexing improvements, including support for requesting
2104 port-forwardings via the multiplex protocol (closes: #360151).
2105 - Allow setting an explicit umask on the sftp-server(8) commandline to
2106 override whatever default the user has (closes: #496843).
2107 - Many sftp client improvements, including tab-completion, more options,
2108 and recursive transfer support for get/put (LP: #33378). The old
2109 mget/mput commands never worked properly and have been removed
2110 (closes: #270399, #428082).
2111 - Do not prompt for a passphrase if we fail to open a keyfile, and log
2112 the reason why the open failed to debug (closes: #431538).
2113 - Prevent sftp from crashing when given a "-" without a command. Also,
2114 allow whitespace to follow a "-" (closes: #531561).
2115
2116 * Fix 'debian/rules quilt-setup' to avoid writing .orig files if some
2117 patches apply with offsets.
2118 * Include debian/ssh-askpass-gnome.png in the Debian tarball now that
2119 we're using a source format that permits this, rather than messing
2120 around with uudecode.
2121 * Drop compatibility with the old gssapi mechanism used in ssh-krb5 <<
2122 3.8.1p1-1. Simon Wilkinson refused this patch since the old gssapi
2123 mechanism was removed due to a serious security hole, and since these
2124 versions of ssh-krb5 are no longer security-supported by Debian I don't
2125 think there's any point keeping client compatibility for them.
2126 * Fix substitution of ETC_PAM_D_SSH, following the rename in 1:4.7p1-4.
2127 * Hardcode the location of xauth to /usr/bin/xauth rather than
2128 /usr/bin/X11/xauth (thanks, Aron Griffis; closes: #575725, LP: #8440).
2129 xauth no longer depends on x11-common, so we're no longer guaranteed to
2130 have the /usr/bin/X11 symlink available. I was taking advantage of the
2131 /usr/bin/X11 symlink to smooth X's move to /usr/bin, but this is far
2132 enough in the past now that it's probably safe to just use /usr/bin.
2133 * Remove SSHD_OOM_ADJUST configuration. sshd now unconditionally makes
2134 itself non-OOM-killable, and doesn't require configuration to avoid log
2135 spam in virtualisation containers (closes: #555625).
2136 * Drop Debian-specific removal of OpenSSL version check. Upstream ignores
2137 the two patchlevel nybbles now, which is sufficient to address the
2138 original reason this change was introduced, and it appears that any
2139 change in the major/minor/fix nybbles would involve a new libssl package
2140 name. (We'd still lose if the status nybble were ever changed, but that
2141 would mean somebody had packaged a development/beta version rather than
2142 a proper release, which doesn't appear to be normal practice.)
2143 * Drop most of our "LogLevel SILENT" (-qq) patch. This was originally
2144 introduced to match the behaviour of non-free SSH, in which -q does not
2145 suppress fatal errors, but matching the behaviour of OpenSSH upstream is
2146 much more important nowadays. We no longer document that -q does not
2147 suppress fatal errors (closes: #280609). Migrate "LogLevel SILENT" to
2148 "LogLevel QUIET" in sshd_config on upgrade.
2149 * Policy version 3.8.4:
2150 - Add a Homepage field.
2151
2152 -- Colin Watson <cjwatson@debian.org> Tue, 06 Apr 2010 22:38:31 +0100
2153
2154openssh (1:5.3p1-3) unstable; urgency=low
2155
2156 * Convert to source format 3.0 (quilt).
2157 * Update README.source to match, and add a 'quilt-setup' target to
2158 debian/rules for the benefit of those checking out the package from
2159 revision control.
2160 * All patches are now maintained separately and tagged according to DEP-3.
2161 * Add GSSAPIStoreCredentialsOnRekey to 'sshd -T' configuration dump.
2162 * Remove documentation of building for Debian 3.0 in README.Debian.
2163 Support for this was removed in 1:4.7p1-2.
2164 * Remove obsolete header from README.Debian dating from when people
2165 expected non-free SSH.
2166 * Update copyright years for GSSAPI patch.
2167
2168 -- Colin Watson <cjwatson@debian.org> Sun, 28 Feb 2010 01:35:53 +0000
2169
2170openssh (1:5.3p1-2) unstable; urgency=low
2171
2172 * Link with -Wl,--as-needed (closes: #560155).
2173 * Install upstream sshd_config as an example (closes: #415008).
2174 * Use dh_lintian.
2175 * Honour DEB_BUILD_OPTIONS=nocheck.
2176
2177 -- Colin Watson <cjwatson@debian.org> Mon, 22 Feb 2010 12:43:24 +0000
2178
2179openssh (1:5.3p1-1) unstable; urgency=low
2180
2181 * New upstream release.
2182 * Update to GSSAPI patch from
2183 http://www.sxw.org.uk/computing/patches/openssh-5.3p1-gsskex-all-20100124.patch.
2184 * Backport from upstream:
2185 - Do not fall back to adding keys without constraints (ssh-add -c / -t
2186 ...) when the agent refuses the constrained add request. This was a
2187 useful migration measure back in 2002 when constraints were new, but
2188 just adds risk now (LP: #209447).
2189 * Drop change from 1:3.8p1-3 to avoid setresuid() and setresgid() system
2190 calls. This only applied to Linux 2.2, which it's no longer feasible to
2191 run anyway (see 1:5.2p1-2 changelog).
2192
2193 -- Colin Watson <cjwatson@debian.org> Tue, 26 Jan 2010 11:55:29 +0000
2194
2195openssh (1:5.2p1-2) unstable; urgency=low
2196
2197 [ Colin Watson ]
2198 * Backport from upstream:
2199 - After sshd receives a SIGHUP, ignore subsequent HUPs while sshd
2200 re-execs itself. Prevents two HUPs in quick succession from resulting
2201 in sshd dying (LP: #497781).
2202 - Output a debug if we can't open an existing keyfile (LP: #505301).
2203 * Use host compiler for ssh-askpass-gnome when cross-compiling.
2204 * Don't run tests when cross-compiling.
2205 * Drop change from 1:3.6.1p2-5 to disable cmsg_type check for file
2206 descriptor passing when running on Linux 2.0. The previous stable
2207 release of Debian dropped support for Linux 2.4, let alone 2.0, so this
2208 very likely has no remaining users depending on it.
2209
2210 [ Kees Cook ]
2211 * Implement DebianBanner server configuration flag that can be set to "no"
2212 to allow sshd to run without the Debian-specific extra version in the
2213 initial protocol handshake (closes: #562048).
2214
2215 -- Colin Watson <cjwatson@debian.org> Sat, 16 Jan 2010 01:28:58 +0000
2216
2217openssh (1:5.2p1-1) unstable; urgency=low
2218
2219 * New upstream release (closes: #536182). Yes, I know 5.3p1 has been out
2220 for a while, but there's no GSSAPI patch available for it yet.
2221 - Change the default cipher order to prefer the AES CTR modes and the
2222 revised "arcfour256" mode to CBC mode ciphers that are susceptible to
2223 CPNI-957037 "Plaintext Recovery Attack Against SSH".
2224 - Add countermeasures to mitigate CPNI-957037-style attacks against the
2225 SSH protocol's use of CBC-mode ciphers. Upon detection of an invalid
2226 packet length or Message Authentication Code, ssh/sshd will continue
2227 reading up to the maximum supported packet length rather than
2228 immediately terminating the connection. This eliminates most of the
2229 known differences in behaviour that leaked information about the
2230 plaintext of injected data which formed the basis of this attack
2231 (closes: #506115, LP: #379329).
2232 - ForceCommand directive now accepts commandline arguments for the
2233 internal-sftp server (closes: #524423, LP: #362511).
2234 - Add AllowAgentForwarding to available Match keywords list (closes:
2235 #540623).
2236 - Make ssh(1) send the correct channel number for
2237 SSH2_MSG_CHANNEL_SUCCESS and SSH2_MSG_CHANNEL_FAILURE messages to
2238 avoid triggering 'Non-public channel' error messages on sshd(8) in
2239 openssh-5.1.
2240 - Avoid printing 'Non-public channel' warnings in sshd(8), since the
2241 ssh(1) has sent incorrect channel numbers since ~2004 (this reverts a
2242 behaviour introduced in openssh-5.1; closes: #496017).
2243 - Disable nonfunctional ssh(1) ~C escape handler in multiplex slave
2244 connections (closes: #507541).
2245 - Fix "whitepsace" typo in ssh_config(5) (closes: #514313, LP: #303835).
2246 * Update to GSSAPI patch from
2247 http://www.sxw.org.uk/computing/patches/openssh-5.2p1-gsskex-all-20090726.patch,
2248 including cascading credentials support (LP: #416958).
2249 * Use x11.pc when compiling/linking gnome-ssh-askpass2 (closes: #555951).
2250 * Moved to bzr.debian.org; add Vcs-Bzr and Vcs-Browser control fields.
2251 * Add debian/README.source with instructions on bzr handling.
2252 * Make ChrootDirectory work with SELinux (thanks, Russell Coker; closes:
2253 #556644).
2254 * Initialise sc to NULL in ssh_selinux_getctxbyname (thanks, Václav Ovsík;
2255 closes: #498684).
2256 * Don't duplicate backslashes when displaying server banner (thanks,
2257 Michał Górny; closes: #505378, LP: #425346).
2258 * Use hardening-includes for hardening logic (thanks, Kees Cook; closes:
2259 #561887).
2260 * Update OpenSSH FAQ to revision 1.110.
2261 * Remove ssh/new_config, only needed for direct upgrades from potato which
2262 are no longer particularly feasible anyway (closes: #420682).
2263 * Cope with insserv reordering of init script links.
2264 * Remove init script stop link in rc1, as killprocs handles it already.
2265 * Adjust short descriptions to avoid relying on previous experience with
2266 rsh, based on suggestions from Reuben Thomas (closes: #512198).
2267 * Remove manual page references to login.conf, which aren't applicable on
2268 non-BSD systems (closes: #154434).
2269 * Remove/adjust manual page references to BSD-specific /etc/rc (closes:
2270 #513417).
2271 * Refer to sshd_config(5) rather than sshd(8) in postinst-written
2272 /etc/ssh/sshd_config, and add UsePAM commentary from upstream-shipped
2273 configuration file (closes: #415008, although unfortunately this will
2274 only be conveniently visible on new installations).
2275 * Include URL to OpenBSD's ssl(8) in ssh(1), since I don't see a better
2276 source for the same information among Debian's manual pages (closes:
2277 #530692, LP: #456660).
2278
2279 -- Colin Watson <cjwatson@debian.org> Mon, 04 Jan 2010 13:23:35 +0000
2280
2281openssh (1:5.1p1-8) unstable; urgency=low
2282
2283 * Build with just -fPIC on mips/mipsel, not -fPIE as well (thanks, LIU Qi;
2284 closes: #538313).
2285 * Build-depend on libselinux1-dev on sh4 too (thanks, Nobuhiro Iwamatsu;
2286 closes: #547103).
2287 * Fix grammar in if-up script (closes: #549128).
2288 * Pass $SSHD_OPTS when checking configuration too (thanks, "sobtwmxt";
2289 closes: #548662).
2290
2291 -- Colin Watson <cjwatson@debian.org> Mon, 05 Oct 2009 13:30:49 +0100
2292
2293openssh (1:5.1p1-7) unstable; urgency=low
2294
2295 * Update config.guess and config.sub from autotools-dev 20090611.1
2296 (closes: #538301).
2297 * Set umask to 022 in the init script as well as postinsts (closes:
2298 #539030).
2299 * Add ${misc:Depends} to keep Lintian happy.
2300 * Use 'which' rather than 'type' in maintainer scripts.
2301 * Upgrade to debhelper v7.
2302
2303 -- Colin Watson <cjwatson@debian.org> Fri, 31 Jul 2009 16:28:10 +0100
2304
2305openssh (1:5.1p1-6) unstable; urgency=low
2306
2307 * Open /proc/self/oom_adj with O_RDONLY or O_WRONLY as necessary, rather
2308 than O_RDWR.
2309 * Disable OOM adjustment for vserver/OpenVZ (thanks, Karl Chen; closes:
2310 #511771).
2311 * Add ufw integration (thanks, Didier Roche; see
2312 https://wiki.ubuntu.com/UbuntuFirewall#Integrating%20UFW%20with%20Packages;
2313 LP: #261884).
2314 * Add a comment above PermitRootLogin in sshd_config pointing to
2315 README.Debian.
2316 * Check if delgroup is present in openssh-client.postrm (closes: #530501).
2317 * Build with -fPIC on mips/mipsel (thanks, Luk Claes; closes: #531942).
2318 * Remove /var/run/sshd from openssh-server package; it will be created at
2319 run-time before starting the server.
2320 * Use invoke-rc.d in openssh-server's if-up script.
2321
2322 -- Colin Watson <cjwatson@debian.org> Fri, 05 Jun 2009 11:56:03 +0100
2323
2324openssh (1:5.1p1-5) unstable; urgency=low
2325
2326 * Backport from upstream CVS (Markus Friedl):
2327 - packet_disconnect() on padding error, too. Should reduce the success
2328 probability for the CPNI-957037 Plaintext Recovery Attack to 2^-18.
2329 * Check that /var/run/sshd.pid exists and that the process ID listed there
2330 corresponds to sshd before running '/etc/init.d/ssh reload' from if-up
2331 script; SIGHUP is racy if called at boot before sshd has a chance to
2332 install its signal handler, but fortunately the pid file is written
2333 after that which lets us avoid the race (closes: #502444).
2334 * While the above is a valuable sanity-check, it turns out that it doesn't
2335 really fix the bug (thanks to Kevin Price for testing), so for the
2336 meantime we'll just use '/etc/init.d/ssh restart', even though it is
2337 unfortunately heavyweight.
2338
2339 -- Colin Watson <cjwatson@debian.org> Wed, 14 Jan 2009 00:34:08 +0000
2340
2341openssh (1:5.1p1-4) unstable; urgency=low
2342
2343 * ssh-copy-id: Strip trailing colons from hostname (closes: #226172,
2344 LP: #249706; thanks to Karl Goetz for nudging this along; forwarded
2345 upstream as https://bugzilla.mindrot.org/show_bug.cgi?id=1530).
2346 * Backport from upstream CVS (Markus Friedl):
2347 - Only send eow and no-more-sessions requests to openssh 5 and newer;
2348 fixes interop problems with broken ssh v2 implementations (closes:
2349 #495917).
2350 * Fix double-free when failing to parse a forwarding specification given
2351 using ~C (closes: #505330; forwarded upstream as
2352 https://bugzilla.mindrot.org/show_bug.cgi?id=1539).
2353
2354 -- Colin Watson <cjwatson@debian.org> Sun, 23 Nov 2008 14:46:10 +0000
2355
2356openssh (1:5.1p1-3) unstable; urgency=low
2357
2358 * Remove unnecessary ssh-vulnkey output in non-verbose mode when no
2359 compromised or unknown keys were found (closes: #496495).
2360 * Configure with --disable-strip; dh_strip will deal with stripping
2361 binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
2362 closes: #498681).
2363 * Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
2364 #497026).
2365
2366 -- Colin Watson <cjwatson@debian.org> Tue, 30 Sep 2008 23:09:58 +0100
2367
2368openssh (1:5.1p1-2) unstable; urgency=low
2369
2370 * Look for $SHELL on the path when executing ProxyCommands or
2371 LocalCommands (closes: #492728).
2372
2373 -- Colin Watson <cjwatson@debian.org> Tue, 29 Jul 2008 15:31:25 +0100
2374
2375openssh (1:5.1p1-1) unstable; urgency=low
2376
2377 * New upstream release (closes: #474301). Important changes not previously
2378 backported to 4.7p1:
2379 - 4.9/4.9p1 (http://www.openssh.com/txt/release-4.9):
2380 + Added chroot(2) support for sshd(8), controlled by a new option
2381 "ChrootDirectory" (closes: #139047, LP: #24777).
2382 + Linked sftp-server(8) into sshd(8). The internal sftp server is used
2383 when the command "internal-sftp" is specified in a Subsystem or
2384 ForceCommand declaration. When used with ChrootDirectory, the
2385 internal sftp server requires no special configuration of files
2386 inside the chroot environment.
2387 + Added a protocol extension method "posix-rename@openssh.com" for
2388 sftp-server(8) to perform POSIX atomic rename() operations; sftp(1)
2389 prefers this if available (closes: #308561).
2390 + Removed the fixed limit of 100 file handles in sftp-server(8).
2391 + ssh(8) will now skip generation of SSH protocol 1 ephemeral server
2392 keys when in inetd mode and protocol 2 connections are negotiated.
2393 This speeds up protocol 2 connections to inetd-mode servers that
2394 also allow Protocol 1.
2395 + Accept the PermitRootLogin directive in a sshd_config(5) Match
2396 block. Allows for, e.g. permitting root only from the local network.
2397 + Reworked sftp(1) argument splitting and escaping to be more
2398 internally consistent (i.e. between sftp commands) and more
2399 consistent with sh(1). Please note that this will change the
2400 interpretation of some quoted strings, especially those with
2401 embedded backslash escape sequences.
2402 + Support "Banner=none" in sshd_config(5) to disable sending of a
2403 pre-login banner (e.g. in a Match block).
2404 + ssh(1) ProxyCommands are now executed with $SHELL rather than
2405 /bin/sh.
2406 + ssh(1)'s ConnectTimeout option is now applied to both the TCP
2407 connection and the SSH banner exchange (previously it just covered
2408 the TCP connection). This allows callers of ssh(1) to better detect
2409 and deal with stuck servers that accept a TCP connection but don't
2410 progress the protocol, and also makes ConnectTimeout useful for
2411 connections via a ProxyCommand.
2412 + scp(1) incorrectly reported "stalled" on slow copies (closes:
2413 #140828).
2414 + scp(1) date underflow for timestamps before epoch.
2415 + ssh(1) used the obsolete SIG DNS RRtype for host keys in DNS,
2416 instead of the current standard RRSIG.
2417 + Correctly drain ACKs when a sftp(1) upload write fails midway,
2418 avoids a fatal() exit from what should be a recoverable condition.
2419 + Fixed ssh-keygen(1) selective host key hashing (i.e. "ssh-keygen -HF
2420 hostname") to not include any IP address in the data to be hashed.
2421 + Make ssh(1) skip listening on the IPv6 wildcard address when a
2422 binding address of 0.0.0.0 is used against an old SSH server that
2423 does not support the RFC4254 syntax for wildcard bind addresses.
2424 + Enable IPV6_V6ONLY socket option on sshd(8) listen socket, as is
2425 already done for X11/TCP forwarding sockets (closes: #439661).
2426 + Fix FD leak that could hang a ssh(1) connection multiplexing master.
2427 + Make ssh(1) -q option documentation consistent with reality.
2428 + Fixed sshd(8) PAM support not calling pam_session_close(), or
2429 failing to call it with root privileges (closes: #372680).
2430 + Fix activation of OpenSSL engine support when requested in configure
2431 (LP: #119295).
2432 + Cache SELinux status earlier so we know if it's enabled after a
2433 chroot (LP: #237557).
2434 - 5.1/5.1p1 (http://www.openssh.com/txt/release-5.1):
2435 + Introduce experimental SSH Fingerprint ASCII Visualisation to ssh(1)
2436 and ssh-keygen(1). Visual fingerprint display is controlled by a new
2437 ssh_config(5) option "VisualHostKey". The intent is to render SSH
2438 host keys in a visual form that is amenable to easy recall and
2439 rejection of changed host keys.
2440 + sshd_config(5) now supports CIDR address/masklen matching in "Match
2441 address" blocks, with a fallback to classic wildcard matching.
2442 + sshd(8) now supports CIDR matching in ~/.ssh/authorized_keys
2443 from="..." restrictions, also with a fallback to classic wildcard
2444 matching.
2445 + Added an extended test mode (-T) to sshd(8) to request that it write
2446 its effective configuration to stdout and exit. Extended test mode
2447 also supports the specification of connection parameters (username,
2448 source address and hostname) to test the application of
2449 sshd_config(5) Match rules.
2450 + ssh(1) now prints the number of bytes transferred and the overall
2451 connection throughput for SSH protocol 2 sessions when in verbose
2452 mode (previously these statistics were displayed for protocol 1
2453 connections only).
2454 + sftp-server(8) now supports extension methods statvfs@openssh.com
2455 and fstatvfs@openssh.com that implement statvfs(2)-like operations.
2456 + sftp(1) now has a "df" command to the sftp client that uses the
2457 statvfs@openssh.com to produce a df(1)-like display of filesystem
2458 space and inode utilisation (requires statvfs@openssh.com support on
2459 the server).
2460 + Added a MaxSessions option to sshd_config(5) to allow control of the
2461 number of multiplexed sessions supported over a single TCP
2462 connection. This allows increasing the number of allowed sessions
2463 above the previous default of 10, disabling connection multiplexing
2464 (MaxSessions=1) or disallowing login/shell/subsystem sessions
2465 entirely (MaxSessions=0).
2466 + Added a no-more-sessions@openssh.com global request extension that
2467 is sent from ssh(1) to sshd(8) when the client knows that it will
2468 never request another session (i.e. when session multiplexing is
2469 disabled). This allows a server to disallow further session requests
2470 and terminate the session in cases where the client has been
2471 hijacked.
2472 + ssh-keygen(1) now supports the use of the -l option in combination
2473 with -F to search for a host in ~/.ssh/known_hosts and display its
2474 fingerprint.
2475 + ssh-keyscan(1) now defaults to "rsa" (protocol 2) keys, instead of
2476 "rsa1" (LP: #129794).
2477 + Added an AllowAgentForwarding option to sshd_config(8) to control
2478 whether authentication agent forwarding is permitted. Note that this
2479 is a loose control, as a client may install their own unofficial
2480 forwarder.
2481 + ssh(1) and sshd(8): avoid unnecessary malloc/copy/free when
2482 receiving network data, resulting in a ~10% speedup.
2483 + ssh(1) and sshd(8) will now try additional addresses when connecting
2484 to a port forward destination whose DNS name resolves to more than
2485 one address. The previous behaviour was to try the only first
2486 address and give up if that failed.
2487 + ssh(1) and sshd(8) now support signalling that channels are
2488 half-closed for writing, through a channel protocol extension
2489 notification "eow@openssh.com". This allows propagation of closed
2490 file descriptors, so that commands such as "ssh -2 localhost od
2491 /bin/ls | true" do not send unnecessary data over the wire.
2492 + sshd(8): increased the default size of ssh protocol 1 ephemeral keys
2493 from 768 to 1024 bits.
2494 + When ssh(1) has been requested to fork after authentication ("ssh
2495 -f") with ExitOnForwardFailure enabled, delay the fork until after
2496 replies for any -R forwards have been seen. Allows for robust
2497 detection of -R forward failure when using -f.
2498 + "Match group" blocks in sshd_config(5) now support negation of
2499 groups. E.g. "Match group staff,!guests".
2500 + sftp(1) and sftp-server(8) now allow chmod-like operations to set
2501 set[ug]id/sticky bits.
2502 + The MaxAuthTries option is now permitted in sshd_config(5) match
2503 blocks.
2504 + Multiplexed ssh(1) sessions now support a subset of the ~ escapes
2505 that are available to a primary connection.
2506 + ssh(1) connection multiplexing will now fall back to creating a new
2507 connection in most error cases (closes: #352830).
2508 + Make ssh(1) deal more gracefully with channel requests that fail.
2509 Previously it would optimistically assume that requests would always
2510 succeed, which could cause hangs if they did not (e.g. when the
2511 server runs out of file descriptors).
2512 + ssh(1) now reports multiplexing errors via the multiplex slave's
2513 stderr where possible (subject to LogLevel in the mux master).
2514 + Fixed an UMAC alignment problem that manifested on Itanium
2515 platforms.
2516 * Remove our local version of moduli(5) now that there's one upstream.
2517 * Say "GTK+" rather than "GTK" in ssh-askpass-gnome's description.
2518 * Add lintian overrides for empty /usr/share/doc/openssh-client
2519 directories in openssh-server and ssh (necessary due to being symlink
2520 targets).
2521 * Merge from Ubuntu:
2522 - Add 'status' action to openssh-server init script, requiring lsb-base
2523 (>= 3.2-13) (thanks, Dustin Kirkland).
2524 * debconf template translations:
2525 - Update Korean (thanks, Sunjae Park; closes: #484821).
2526
2527 -- Colin Watson <cjwatson@debian.org> Fri, 25 Jul 2008 10:45:08 +0100
2528
2529openssh (1:4.7p1-13) unstable; urgency=low
2530
2531 * Add some helpful advice to the end of ssh-vulnkey's output if there are
2532 unknown or compromised keys (thanks, Dan Jacobson; closes: #483756).
2533 * Check compromised key blacklist in ssh or ssh-add, as well as in the
2534 server (LP: #232391). To override the blacklist check in ssh
2535 temporarily, use 'ssh -o UseBlacklistedKeys=yes'; there is no override
2536 for the blacklist check in ssh-add.
2537 * Add cross-references to ssh-vulnkey(1) to ssh(1), ssh-add(1),
2538 ssh-keygen(1), and sshd(8) (closes: #484451).
2539 * Change openssh-client-udeb's Installer-Menu-Item from 99900 to 99999
2540 (thanks, Frans Pop).
2541 * Drop openssh-client-udeb isinstallable hack, as main-menu (>= 1.26) now
2542 takes care of that (thanks, Frans Pop; closes: #484404).
2543 * Update DEB_BUILD_OPTIONS parsing code from policy 3.8.0.
2544 * Add documentation on removing openssh-blacklist locally (see #484269).
2545 * Clarify documentation of SSHD_OOM_ADJUST, and make setting it to the
2546 empty string actually skip adjustment as intended (closes: #487325).
2547 * Remove empty /usr/share/applications directory in ssh-askpass-gnome.
2548 * debconf template translations:
2549 - Update Romanian (thanks, Cătălin Feștilă; closes: #485415).
2550
2551 -- Colin Watson <cjwatson@debian.org> Mon, 21 Jul 2008 12:18:28 +0100
2552
2553openssh (1:4.7p1-12) unstable; urgency=low
2554
2555 * Fill in CVE identifier for ssh-vulnkey bug fixed in 1:4.7p1-10.
2556 * Refactor rejection of blacklisted user keys into a single
2557 reject_blacklisted_key function in auth.c (thanks, Dmitry V. Levin).
2558 * Fix memory leak of blacklisted host keys (thanks, Dmitry V. Levin).
2559 * debconf template translations:
2560 - Update Dutch (thanks, Bart Cornelis; closes: #483004).
2561 - Update Brazilian Portuguese (thanks, Eder L. Marques; closes:
2562 #483142).
2563 - Update Slovak (thanks, Ivan Masár; closes: #483517).
2564
2565 -- Colin Watson <cjwatson@debian.org> Thu, 29 May 2008 21:41:29 +0100
2566
2567openssh (1:4.7p1-11) unstable; urgency=low
2568
2569 * Make init script depend on $syslog, and fix some other dependency
2570 glitches (thanks, Petter Reinholdtsen; closes: #481018).
2571 * Remove 0 and 6 from Default-Stop in init script (thanks, Kel Modderman;
2572 closes: #481151).
2573 * Restore OOM killer adjustment for child processes (thanks, Vaclav Ovsik;
2574 closes: #480020).
2575 * Allow building with heimdal-dev (LP: #125805).
2576
2577 * Check RSA1 keys without the need for a separate blacklist. Thanks to
2578 Simon Tatham for the idea.
2579 * Generate two keys with the PID forced to the same value and test that
2580 they differ, to defend against recurrences of the recent Debian OpenSSL
2581 vulnerability.
2582 * Recommend openssh-blacklist from openssh-client (closes: #481187).
2583 * Recommend openssh-blacklist-extra from openssh-client and
2584 openssh-server.
2585 * Make ssh-vulnkey report the file name and line number for each key
2586 (thanks, Heiko Schlittermann and Christopher Perry; closes: #481398).
2587 * Check for blacklists in /usr/share/ssh/ as well as /etc/ssh/ (see
2588 #481283).
2589 * Log IP addresses of hosts attempting to use blacklisted keys (closes:
2590 #481721).
2591 * Incorporate various ssh-vulnkey suggestions from Hugh Daniel:
2592 - Add -v (verbose) option, and don't print output for keys that have a
2593 blacklist file but that are not listed unless in verbose mode.
2594 - Move exit status documentation to a separate section.
2595 - Document key status descriptions.
2596 - Add key type to output.
2597 - Fix error output if ssh-vulnkey fails to read key files, with the
2598 exception of host keys unless -a was given.
2599 - In verbose mode, output the name of each file examined.
2600 * Handle leading IP addresses in ssh-vulnkey input (LP: #230497).
2601 * Fix various ssh-vulnkey problems pointed out by Solar Designer:
2602 - Fix some buffer handling inconsistencies.
2603 - Use xasprintf to build user key file names, avoiding truncation
2604 problems.
2605 - Drop to the user's UID when reading user keys with -a.
2606 - Use EUID rather than UID when run with no file names and without -a.
2607 - Reword "Unknown (no blacklist information)" to "Unknown (blacklist
2608 file not installed)".
2609
2610 * Fix typo in ssh/vulnerable_host_keys message (thanks, Esko Arajärvi).
2611 * debconf template translations:
2612 - Update Finnish (thanks, Esko Arajärvi; closes: #481530).
2613 - Update French (thanks, Christian Perrier; closes: #481576).
2614 - Update Norwegian Bokmål (thanks, Bjørn Steensrud; closes: #481591).
2615 - Update Galician (thanks, Jacobo Tarrio; closes: #481596).
2616 - Update Japanese (thanks, Kenshi Muto; closes: #481621).
2617 - Update Czech (thanks, Miroslav Kure; closes: #481624).
2618 - Update German (thanks, Helge Kreutzmann; closes: #481676).
2619 - Update Portuguese (thanks, Ricardo Silva; closes: #481781).
2620 - Update Basque (thanks, Piarres Beobide; closes: #481836).
2621 - Update Bulgarian (thanks, Damyan Ivanov; closes: #481870).
2622 - Update Vietnamese (thanks, Clytie Siddall; closes: #481876).
2623 - Update Spanish (thanks, Javier Fernandez-Sanguino Peña; closes:
2624 #482341).
2625 - Update Turkish (thanks, Mert Dirik; closes: #482548).
2626 - Update Russian (thanks, Yuri Kozlov; closes: #482887).
2627 - Update Swedish (thanks, Martin Bagge; closes: #482464).
2628 - Update Italian (thanks, Luca Monducci; closes: #482808).
2629
2630 -- Colin Watson <cjwatson@debian.org> Mon, 26 May 2008 12:21:39 +0100
2631
2632openssh (1:4.7p1-10) unstable; urgency=low
2633
2634 * Add a FILES section to ssh-vulnkey(1) (thanks, Hugh Daniel).
2635 * CVE-2008-2285: ssh-vulnkey handles options in authorized_keys
2636 (LP: #230029), and treats # as introducing a comment even if it is
2637 preceded by whitespace.
2638
2639 -- Colin Watson <cjwatson@debian.org> Wed, 14 May 2008 12:35:05 +0100
2640
2641openssh (1:4.7p1-9) unstable; urgency=critical
2642
2643 * Fill in CVE identifier for security vulnerability fixed in 1:4.7p1-8.
2644 * Mitigate OpenSSL security vulnerability (CVE-2008-0166):
2645 - Add key blacklisting support. Keys listed in
2646 /etc/ssh/blacklist.TYPE-LENGTH will be rejected for authentication by
2647 sshd, unless "PermitBlacklistedKeys yes" is set in
2648 /etc/ssh/sshd_config.
2649 - Add a new program, ssh-vulnkey, which can be used to check keys
2650 against these blacklists.
2651 - Depend on openssh-blacklist.
2652 - Force dependencies on libssl0.9.8 / libcrypto0.9.8-udeb to at least
2653 0.9.8g-9.
2654 - Automatically regenerate known-compromised host keys, with a
2655 critical-priority debconf note. (I regret that there was no time to
2656 gather translations.)
2657
2658 -- Colin Watson <cjwatson@debian.org> Tue, 13 May 2008 12:33:38 +0100
2659
2660openssh (1:4.7p1-8) unstable; urgency=high
2661
2662 * Fill in CVE identifier for security vulnerability fixed in 1:4.7p1-5.
2663 * Rename KeepAlive to TCPKeepAlive in sshd_config, cleaning up from old
2664 configurations (LP: #211400).
2665 * Tweak scp's reporting of filenames in verbose mode to be a bit less
2666 confusing with spaces (thanks, Nicolas Valcárcel; LP: #89945).
2667 * Backport from 4.9p1:
2668 - CVE-2008-1657: Ignore ~/.ssh/rc if a sshd_config ForceCommand is
2669 specified.
2670 - Add no-user-rc authorized_keys option to disable execution of
2671 ~/.ssh/rc.
2672 * Backport from Simon Wilkinson's GSSAPI key exchange patch for 5.0p1:
2673 - Add code to actually implement GSSAPIStrictAcceptorCheck, which had
2674 somehow been omitted from a previous version of this patch (closes:
2675 #474246).
2676
2677 -- Colin Watson <cjwatson@debian.org> Sun, 06 Apr 2008 12:34:19 +0100
2678
2679openssh (1:4.7p1-7) unstable; urgency=low
2680
2681 * Ignore errors writing to oom_adj (closes: #473573).
2682
2683 -- Colin Watson <cjwatson@debian.org> Mon, 31 Mar 2008 16:24:44 +0100
2684
2685openssh (1:4.7p1-6) unstable; urgency=low
2686
2687 * Disable the Linux kernel's OOM-killer for the sshd parent; tweak
2688 SSHD_OOM_ADJUST in /etc/default/ssh to change this (closes: #341767).
2689
2690 -- Colin Watson <cjwatson@debian.org> Sun, 30 Mar 2008 21:14:12 +0100
2691
2692openssh (1:4.7p1-5) unstable; urgency=low
2693
2694 * Recommends: xauth rather than Suggests: xbase-clients.
2695 * Document in ssh(1) that '-S none' disables connection sharing
2696 (closes: #471437).
2697 * Patch from Red Hat / Fedora:
2698 - CVE-2008-1483: Don't use X11 forwarding port which can't be bound on
2699 all address families, preventing hijacking of X11 forwarding by
2700 unprivileged users when both IPv4 and IPv6 are configured (closes:
2701 #463011).
2702 * Use printf rather than echo -en (a bashism) in openssh-server.config and
2703 openssh-server.preinst.
2704 * debconf template translations:
2705 - Update Finnish (thanks, Esko Arajärvi; closes: #468563).
2706
2707 -- Colin Watson <cjwatson@debian.org> Sat, 22 Mar 2008 12:37:00 +0000
2708
2709openssh (1:4.7p1-4) unstable; urgency=low
2710
2711 [ Caleb Case ]
2712 * Fix configure detection of getseuserbyname and
2713 get_default_context_with_level (closes: #465614, LP: #188136).
2714
2715 [ Colin Watson ]
2716 * Include the autogenerated debian/copyright in the source package.
2717 * Move /etc/pam.d/ssh to /etc/pam.d/sshd, allowing us to stop defining
2718 SSHD_PAM_SERVICE (closes: #255870).
2719
2720 -- Colin Watson <cjwatson@debian.org> Wed, 13 Feb 2008 18:18:52 +0000
2721
2722openssh (1:4.7p1-3) unstable; urgency=low
2723
2724 * Improve grammar of ssh-askpass-gnome description.
2725 * Backport from upstream:
2726 - Use the correct packet maximum sizes for remote port and agent
2727 forwarding. Prevents the server from killing the connection if too
2728 much data is queued and an excessively large packet gets sent
2729 (https://bugzilla.mindrot.org/show_bug.cgi?id=1360).
2730 * Allow passing temporary daemon parameters on the init script's command
2731 line, e.g. '/etc/init.d/ssh start "-o PermitRootLogin=yes"' (thanks,
2732 Marc Haber; closes: #458547).
2733
2734 -- Colin Watson <cjwatson@debian.org> Fri, 01 Feb 2008 21:59:59 +0000
2735
2736openssh (1:4.7p1-2) unstable; urgency=low
2737
2738 * Adjust many relative links in faq.html to point to
2739 http://www.openssh.com/ (thanks, Dan Jacobson; mentioned in #459807).
2740 * Pass --with-mantype=doc to configure rather than build-depending on
2741 groff (closes: #460121).
2742 * Add armel to architecture list for libselinux1-dev build-dependency
2743 (closes: #460136).
2744 * Drop source-compatibility with Debian 3.0:
2745 - Remove support for building with GNOME 1. This allows simplification
2746 of our GNOME build-dependencies (see #460136).
2747 - Remove hacks to support the old PAM configuration scheme.
2748 - Remove compatibility for building without po-debconf.
2749 * Build-depend on libgtk2.0-dev rather than libgnomeui-dev. As far as I
2750 can see, the GTK2 version of ssh-askpass-gnome has never required
2751 libgnomeui-dev.
2752
2753 -- Colin Watson <cjwatson@debian.org> Fri, 11 Jan 2008 00:14:10 +0000
2754
2755openssh (1:4.7p1-1) unstable; urgency=low
2756
2757 * New upstream release (closes: #453367).
2758 - CVE-2007-4752: Prevent ssh(1) from using a trusted X11 cookie if
2759 creation of an untrusted cookie fails; found and fixed by Jan Pechanec
2760 (closes: #444738).
2761 - sshd(8) in new installations defaults to SSH Protocol 2 only. Existing
2762 installations are unchanged.
2763 - The SSH channel window size has been increased, and both ssh(1)
2764 sshd(8) now send window updates more aggressively. These improves
2765 performance on high-BDP (Bandwidth Delay Product) networks.
2766 - ssh(1) and sshd(8) now preserve MAC contexts between packets, which
2767 saves 2 hash calls per packet and results in 12-16% speedup for
2768 arcfour256/hmac-md5.
2769 - A new MAC algorithm has been added, UMAC-64 (RFC4418) as
2770 "umac-64@openssh.com". UMAC-64 has been measured to be approximately
2771 20% faster than HMAC-MD5.
2772 - Failure to establish a ssh(1) TunnelForward is now treated as a fatal
2773 error when the ExitOnForwardFailure option is set.
2774 - ssh(1) returns a sensible exit status if the control master goes away
2775 without passing the full exit status.
2776 - When using a ProxyCommand in ssh(1), set the outgoing hostname with
2777 gethostname(2), allowing hostbased authentication to work.
2778 - Make scp(1) skip FIFOs rather than hanging (closes: #246774).
2779 - Encode non-printing characters in scp(1) filenames. These could cause
2780 copies to be aborted with a "protocol error".
2781 - Handle SIGINT in sshd(8) privilege separation child process to ensure
2782 that wtmp and lastlog records are correctly updated.
2783 - Report GSSAPI mechanism in errors, for libraries that support multiple
2784 mechanisms.
2785 - Improve documentation for ssh-add(1)'s -d option.
2786 - Rearrange and tidy GSSAPI code, removing server-only code being linked
2787 into the client.
2788 - Delay execution of ssh(1)'s LocalCommand until after all forwardings
2789 have been established.
2790 - In scp(1), do not truncate non-regular files.
2791 - Improve exit message from ControlMaster clients.
2792 - Prevent sftp-server(8) from reading until it runs out of buffer space,
2793 whereupon it would exit with a fatal error (closes: #365541).
2794 - pam_end() was not being called if authentication failed
2795 (closes: #405041).
2796 - Manual page datestamps updated (closes: #433181).
2797 * Install the OpenSSH FAQ in /usr/share/doc/openssh-client.
2798 - Includes documentation on copying files with colons using scp
2799 (closes: #303453).
2800 * Create /var/run/sshd on start even if /etc/ssh/sshd_not_to_be_run exists
2801 (closes: #453285).
2802 * Fix "overriden" typo in ssh(1) (thanks, A. Costa; closes: #390699).
2803 * Refactor debian/rules configure and make invocations to make development
2804 easier.
2805 * Remove the hideously old /etc/ssh/primes on upgrade (closes: #123013).
2806 * Update moduli(5) to revision 1.11 from OpenBSD CVS.
2807 * Document the non-default options we set as standard in ssh_config(5) and
2808 sshd_config(5) (closes: #327886, #345628).
2809 * Recode LICENCE to UTF-8 when concatenating it to debian/copyright.
2810 * Override desktop-file-but-no-dh_desktop-call lintian warning; the
2811 .desktop file is intentionally not installed (see 1:3.8.1p1-10).
2812 * Update copyright dates for Kerberos patch in debian/copyright.head.
2813 * Policy version 3.7.3: no changes required.
2814
2815 -- Colin Watson <cjwatson@debian.org> Mon, 24 Dec 2007 16:43:02 +0000
2816
2817openssh (1:4.6p1-7) unstable; urgency=low
2818
2819 * Don't build PIE executables on m68k (closes: #451192).
2820 * Use autotools-dev's recommended configure --build and --host options.
2821 * Adjust README.Debian to suggest mailing debian-ssh@lists.debian.org
2822 rather than Matthew.
2823 * Check whether deluser exists in postrm (closes: #454085).
2824
2825 -- Colin Watson <cjwatson@debian.org> Mon, 03 Dec 2007 11:11:02 +0000
2826
2827openssh (1:4.6p1-6) unstable; urgency=low
2828
2829 * Remove blank line between head comment and first template in
2830 debian/openssh-server.templates.master; apparently it confuses some
2831 versions of debconf.
2832 * Install authorized_keys(5) as a symlink to sshd(8) (thanks, Tomas
2833 Pospisek; closes: #441817).
2834 * Discard error output from dpkg-query in preinsts, in case the ssh
2835 metapackage is not installed.
2836 * Fix sshd/inittab advice in README.Debian to account for rc.d movement
2837 (closes: #450632).
2838 * Suppress error from debian/rules if lsb-release is not installed.
2839 * Don't ignore errors from 'make -C contrib clean'.
2840 * Adjust categories in ssh-askpass-gnome.desktop to comply with the
2841 Desktop Menu Specification.
2842 * debconf template translations:
2843 - Add Slovak (thanks, Ivan Masár; closes: #441690).
2844 - Update Brazilian Portuguese (thanks, Eder L. Marques;
2845 closes: #447145).
2846
2847 -- Colin Watson <cjwatson@debian.org> Mon, 12 Nov 2007 11:47:28 +0000
2848
2849openssh (1:4.6p1-5) unstable; urgency=low
2850
2851 * Identify ssh as a metapackage rather than a transitional package. It's
2852 still useful as a quick way to install both the client and the server.
2853 * ssh-copy-id now checks the exit status of ssh-add -L (thanks, Adeodato
2854 Simó; closes: #221675).
2855 * ssh-copy-id no longer prints the output of expr (thanks, Peter
2856 Eisentraut; closes: #291534).
2857 * ssh-copy-id defaults to ~/.ssh/id_rsa.pub rather than
2858 ~/.ssh/identity.pub, in line with ssh-keygen (thanks, Greg Norris;
2859 closes: #234627).
2860 * Build-depend on libselinux1-dev on lpia.
2861 * openssh-client Suggests: keychain.
2862 * debconf template translations:
2863 - Update Catalan (thanks, Jordà Polo; closes: #431970).
2864
2865 -- Colin Watson <cjwatson@debian.org> Mon, 30 Jul 2007 09:34:38 +0100
2866
2867openssh (1:4.6p1-4) unstable; urgency=low
2868
2869 * Don't build PIE executables on hppa, as they crash.
2870
2871 -- Colin Watson <cjwatson@debian.org> Thu, 05 Jul 2007 11:06:54 +0100
2872
2873openssh (1:4.6p1-3) unstable; urgency=low
2874
2875 * Only build PIE executables on Linux and NetBSD (closes: #430455).
2876 * Fix broken switch fallthrough when SELinux is running in permissive mode
2877 (closes: #430838).
2878 * Document that HashKnownHosts may break tab-completion (closes: #430154).
2879
2880 -- Colin Watson <cjwatson@debian.org> Fri, 29 Jun 2007 07:15:38 +0100
2881
2882openssh (1:4.6p1-2) unstable; urgency=low
2883
2884 * Fix ordering of SYSLOG_LEVEL_QUIET and SYSLOG_LEVEL_FATAL.
2885 * Clarify that 'ssh -q -q' still prints errors caused by bad arguments
2886 (i.e. before the logging system is initialised).
2887 * Suppress "Connection to <host> closed" and "Connection to master closed"
2888 messages at loglevel SILENT (thanks, Jaap Eldering; closes: #409788).
2889 * Suppress "Pseudo-terminal will not be allocated because stdin is not a
2890 terminal" message at loglevels QUIET and SILENT (closes: #366814).
2891 * Document the SILENT loglevel in sftp-server(8), ssh_config(5), and
2892 sshd_config(5).
2893 * Add try-restart action to init script.
2894 * Add /etc/network/if-up.d/openssh-server to restart sshd when new
2895 interfaces appear (LP: #103436).
2896 * Backport from upstream:
2897 - Move C/R -> kbdint special case to after the defaults have been
2898 loaded, which makes ChallengeResponse default to yes again. This was
2899 broken by the Match changes and not fixed properly subsequently
2900 (closes: #428968).
2901 - Silence spurious error messages from hang-on-exit fix
2902 (http://bugzilla.mindrot.org/show_bug.cgi?id=1306, closes: #429531).
2903
2904 -- Colin Watson <cjwatson@debian.org> Wed, 20 Jun 2007 11:52:44 +0100
2905
2906openssh (1:4.6p1-1) unstable; urgency=low
2907
2908 * New upstream release (closes: #395507, #397961, #420035). Important
2909 changes not previously backported to 4.3p2:
2910 - 4.4/4.4p1 (http://www.openssh.com/txt/release-4.4):
2911 + On portable OpenSSH, fix a GSSAPI authentication abort that could be
2912 used to determine the validity of usernames on some platforms.
2913 + Implemented conditional configuration in sshd_config(5) using the
2914 "Match" directive. This allows some configuration options to be
2915 selectively overridden if specific criteria (based on user, group,
2916 hostname and/or address) are met. So far a useful subset of
2917 post-authentication options are supported and more are expected to
2918 be added in future releases.
2919 + Add support for Diffie-Hellman group exchange key agreement with a
2920 final hash of SHA256.
2921 + Added a "ForceCommand" directive to sshd_config(5). Similar to the
2922 command="..." option accepted in ~/.ssh/authorized_keys, this forces
2923 the execution of the specified command regardless of what the user
2924 requested. This is very useful in conjunction with the new "Match"
2925 option.
2926 + Add a "PermitOpen" directive to sshd_config(5). This mirrors the
2927 permitopen="..." authorized_keys option, allowing fine-grained
2928 control over the port-forwardings that a user is allowed to
2929 establish.
2930 + Add optional logging of transactions to sftp-server(8).
2931 + ssh(1) will now record port numbers for hosts stored in
2932 ~/.ssh/known_hosts when a non-standard port has been requested
2933 (closes: #50612).
2934 + Add an "ExitOnForwardFailure" option to cause ssh(1) to exit (with a
2935 non-zero exit code) when requested port forwardings could not be
2936 established.
2937 + Extend sshd_config(5) "SubSystem" declarations to allow the
2938 specification of command-line arguments.
2939 + Replacement of all integer overflow susceptible invocations of
2940 malloc(3) and realloc(3) with overflow-checking equivalents.
2941 + Many manpage fixes and improvements.
2942 + Add optional support for OpenSSL hardware accelerators (engines),
2943 enabled using the --with-ssl-engine configure option.
2944 + Tokens in configuration files may be double-quoted in order to
2945 contain spaces (closes: #319639).
2946 + Move a debug() call out of a SIGCHLD handler, fixing a hang when the
2947 session exits very quickly (closes: #307890).
2948 + Fix some incorrect buffer allocation calculations (closes: #410599).
2949 + ssh-add doesn't ask for a passphrase if key file permissions are too
2950 liberal (closes: #103677).
2951 + Likewise, ssh doesn't ask either (closes: #99675).
2952 - 4.6/4.6p1 (http://www.openssh.com/txt/release-4.6):
2953 + sshd now allows the enabling and disabling of authentication methods
2954 on a per user, group, host and network basis via the Match directive
2955 in sshd_config.
2956 + Fixed an inconsistent check for a terminal when displaying scp
2957 progress meter (closes: #257524).
2958 + Fix "hang on exit" when background processes are running at the time
2959 of exit on a ttyful/login session (closes: #88337).
2960 * Update to current GSSAPI patch from
2961 http://www.sxw.org.uk/computing/patches/openssh-4.6p1-gsskex-20070312.patch;
2962 install ChangeLog.gssapi.
2963 * Build the .deb --with-ssl-engine (closes: #408027, LP: #119295).
2964 * Use LSB functions in init scripts, and add an LSB-style header (partly
2965 from Ubuntu and partly thanks to Christian Perrier; closes: #389038).
2966 * Move init script start links to S16, move rc1 stop link to K84, and
2967 remove rc0 and rc6 stop links altogether (the last part from Ubuntu;
2968 closes: #122188).
2969 * Emit a slightly more informative message from the init script if
2970 /dev/null has somehow become not a character device (closes: #369964).
2971 * Belatedly build-depend on zlib1g-dev (>= 1:1.2.3-1) (closes: #333447).
2972 * Merge from Ubuntu:
2973 - Build position-independent executables (only for debs, not for udebs)
2974 to take advantage of address space layout randomisation.
2975 - If building on Ubuntu, add /sbin, /usr/sbin, and /usr/local/sbin to
2976 the default path.
2977 * Use ${binary:Version} rather than ${Source-Version} in openssh-server ->
2978 openssh-client dependency.
2979
2980 -- Colin Watson <cjwatson@debian.org> Wed, 13 Jun 2007 00:28:26 +0100
2981
2982openssh (1:4.3p2-11) unstable; urgency=low
2983
2984 * It's been four and a half years now since I took over as "temporary"
2985 maintainer, so the Maintainer field is getting a bit inaccurate. Set
2986 Maintainer to debian-ssh@lists.debian.org and leave Matthew and myself
2987 as Uploaders.
2988 * Use dpkg-query to fetch conffile md5sums rather than parsing
2989 /var/lib/dpkg/status directly.
2990 * openssh-client Suggests: libpam-ssh (closes: #427840).
2991 * Use 'start-stop-daemon --oknodo' so that openssh-server's init script
2992 exits successfully if sshd is already running (closes: #426858).
2993
2994 * Apply results of debconf templates and package descriptions review by
2995 debian-l10n-english (closes: #420107, #420742).
2996 * debconf template translations:
2997 - Update Dutch (thanks, Machteld de Kok; closes: #419260).
2998 - Update Norwegian Bokmål (thanks, Bjørn Steensrud; closes: #420630).
2999 - Update Galician (thanks, Jacobo Tarrio; closes: #420635).
3000 - Update Spanish (thanks, Javier Fernández-Sanguino Peña;
3001 closes: #420651).
3002 - Update Swedish (thanks, Daniel Nylander; closes: #420663).
3003 - Add Bulgarian (thanks, Damyan Ivanov; closes: #420703).
3004 - Add Tamil (thanks, Tirumurti Vasudevan; closes: #420739).
3005 - Update German (thanks, Helge Kreutzmann; closes: #420743).
3006 - Update Japanese (thanks, Kenshi Muto; closes: #420946).
3007 - Add Basque (thanks, Piarres Beobide; closes: #421238).
3008 - Update Italian (thanks, Luca Monducci; closes: #421348).
3009 - Update Czech (thanks, Miroslav Kure; closes: #421484).
3010 - Update Romanian (thanks, Igor Stirbu; closes: #421760).
3011 - Update Russian (thanks, Yuriy Talakan' and Sergey Alyoshin;
3012 closes: #420862).
3013 - Update Dutch (thanks, Bart Cornelis; closes: #422767).
3014 - Update Portuguese (thanks, Ricardo Silva; closes: #423112).
3015 - Update French (thanks, Christian Perrier).
3016 - Add Korean (thanks, Sunjae Park; closes: #424008).
3017 - Update Vietnamese (thanks, Clytie Siddall; closes: #426991).
3018
3019 -- Colin Watson <cjwatson@debian.org> Sun, 10 Jun 2007 08:59:42 +0100
3020
3021openssh (1:4.3p2-10) unstable; urgency=low
3022
3023 * Multiply openssh-client-udeb's Installer-Menu-Item by 100.
3024 * Increase MAX_SESSIONS to 64.
3025
3026 -- Colin Watson <cjwatson@debian.org> Tue, 10 Apr 2007 19:17:20 +0100
3027
3028openssh (1:4.3p2-9) unstable; urgency=high
3029
3030 [ Russ Allbery ]
3031 * Fix GSSAPIKeyExchange configuration file handling logic in ssh-krb5
3032 (closes: #404863).
3033 * Fix uncommenting of GSSAPI options by ssh-krb5 (closes: #407766).
3034
3035 [ Colin Watson ]
3036 * debconf template translations:
3037 - Add Norwegian Bokmål (thanks, Bjørn Steensrud; closes: #412330).
3038
3039 -- Colin Watson <cjwatson@debian.org> Mon, 5 Mar 2007 16:13:50 +0000
3040
3041openssh (1:4.3p2-8) unstable; urgency=medium
3042
3043 [ Vincent Untz ]
3044 * Give the ssh-askpass-gnome window a default icon; remove unnecessary
3045 icon extension from .desktop file (closes:
3046 https://launchpad.net/bugs/27152).
3047
3048 [ Colin Watson ]
3049 * Drop versioning on ssh/ssh-krb5 Replaces, as otherwise it isn't
3050 sufficient to replace conffiles (closes: #402804).
3051 * Make GSSAPICleanupCreds a compatibility alias for
3052 GSSAPICleanupCredentials. Mark GSSUseSessionCCache and
3053 GSSAPIUseSessionCredCache as known-but-unsupported options, and migrate
3054 away from them on upgrade.
3055 * It turns out that the people who told me that removing a conffile in the
3056 preinst was sufficient to have dpkg replace it without prompting when
3057 moving a conffile between packages were very much mistaken. As far as I
3058 can tell, the only way to do this reliably is to write out the desired
3059 new text of the conffile in the preinst. This is gross, and requires
3060 shipping the text of all conffiles in the preinst too, but there's
3061 nothing for it. Fortunately this nonsense is only required for smooth
3062 upgrades from sarge.
3063 * debconf template translations:
3064 - Add Romanian (thanks, Stan Ioan-Eugen; closes: #403528).
3065
3066 -- Colin Watson <cjwatson@debian.org> Sat, 23 Dec 2006 18:38:33 +0000
3067
3068openssh (1:4.3p2-7) unstable; urgency=medium
3069
3070 [ Colin Watson ]
3071 * Ignore errors from usermod when changing sshd's shell, since it will
3072 fail if the sshd user is not local (closes: #398436).
3073 * Remove version control tags from /etc/ssh/moduli and /etc/ssh/ssh_config
3074 to avoid unnecessary conffile resolution steps for administrators
3075 (thanks, Jari Aalto; closes: #335259).
3076 * Fix quoting error in configure.ac and regenerate configure (thanks, Ben
3077 Pfaff; closes: #391248).
3078 * When installing openssh-client or openssh-server from scratch, remove
3079 any unchanged conffiles from the pre-split ssh package to work around a
3080 bug in sarge's dpkg (thanks, Justin Pryzby and others; closes: #335276).
3081
3082 [ Russ Allbery ]
3083 * Create transitional ssh-krb5 package which enables GSSAPI configuration
3084 in sshd_config (closes: #390986).
3085 * Default client to attempting GSSAPI authentication.
3086 * Remove obsolete GSSAPINoMICAuthentication from sshd_config if it's
3087 found.
3088 * Add ssh -K option, the converse of -k, to enable GSSAPI credential
3089 delegation (closes: #401483).
3090
3091 -- Colin Watson <cjwatson@debian.org> Wed, 6 Dec 2006 23:00:49 +0000
3092
3093openssh (1:4.3p2-6) unstable; urgency=low
3094
3095 * Acknowledge NMU (thanks, Manoj; closes: #394795).
3096 * Backport from 4.5p1:
3097 - Fix a bug in the sshd privilege separation monitor that weakened its
3098 verification of successful authentication. This bug is not known to be
3099 exploitable in the absence of additional vulnerabilities.
3100 * openssh-server Suggests: molly-guard (closes: #395473).
3101 * debconf template translations:
3102 - Update German (thanks, Helge Kreutzmann; closes: #395947).
3103
3104 -- Colin Watson <cjwatson@debian.org> Wed, 15 Nov 2006 00:07:32 +0000
3105
3106openssh (1:4.3p2-5.1) unstable; urgency=low
3107
3108 * NMU to update SELinux patch, bringing it in line with current selinux
3109 releases. The patch for this NMU is simply the Bug#394795 patch,
3110 and no other changes. (closes: #394795)
3111
3112 -- Manoj Srivastava <srivasta@debian.org> Mon, 23 Oct 2006 14:11:24 -0500
3113
3114openssh (1:4.3p2-5) unstable; urgency=low
3115
3116 * Remove ssh/insecure_telnetd check altogether (closes: #391081).
3117 * debconf template translations:
3118 - Update Danish (thanks, Claus Hindsgaul; closes: #390612).
3119
3120 -- Colin Watson <cjwatson@debian.org> Thu, 5 Oct 2006 09:04:19 +0100
3121
3122openssh (1:4.3p2-4) unstable; urgency=high
3123
3124 * Backport from 4.4p1 (since I don't have an updated version of the GSSAPI
3125 patch yet):
3126 - CVE-2006-4924: Fix a pre-authentication denial of service found by
3127 Tavis Ormandy, that would cause sshd(8) to spin until the login grace
3128 time expired (closes: #389995).
3129 - CVE-2006-5051: Fix an unsafe signal hander reported by Mark Dowd. The
3130 signal handler was vulnerable to a race condition that could be
3131 exploited to perform a pre-authentication denial of service. On
3132 portable OpenSSH, this vulnerability could theoretically lead to
3133 pre-authentication remote code execution if GSSAPI authentication is
3134 enabled, but the likelihood of successful exploitation appears remote.
3135
3136 * Read /etc/default/locale as well as /etc/environment (thanks, Raphaël
3137 Hertzog; closes: #369395).
3138 * Remove no-longer-used ssh/insecure_rshd debconf template.
3139 * Make ssh/insecure_telnetd Type: error (closes: #388946).
3140
3141 * debconf template translations:
3142 - Update Portuguese (thanks, Rui Branco; closes: #381942).
3143 - Update Spanish (thanks, Javier Fernández-Sanguino Peña;
3144 closes: #382966).
3145
3146 -- Colin Watson <cjwatson@debian.org> Fri, 29 Sep 2006 16:28:24 +0100
3147
3148openssh (1:4.3p2-3) unstable; urgency=low
3149
3150 * Document KeepAlive->TCPKeepAlive renaming in sshd_config(5) (closes:
3151 https://launchpad.net/bugs/50702).
3152 * Change sshd user's shell to /usr/sbin/nologin (closes: #366541).
3153 Introduces dependency on passwd for usermod.
3154 * debconf template translations:
3155 - Update French (thanks, Denis Barbier; closes: #368503).
3156 - Update Dutch (thanks, Bart Cornelis; closes: #375100).
3157 - Update Japanese (thanks, Kenshi Muto; closes: #379950).
3158
3159 -- Colin Watson <cjwatson@debian.org> Thu, 27 Jul 2006 00:12:36 +0100
3160
3161openssh (1:4.3p2-2) unstable; urgency=low
3162
3163 * Include commented-out pam_access example in /etc/pam.d/ssh.
3164 * On '/etc/init.d/ssh restart', create /var/run/sshd before checking the
3165 server configuration, as otherwise 'sshd -t' will complain about the
3166 lack of /var/run/sshd (closes: https://launchpad.net/bugs/45234).
3167 * debconf template translations:
3168 - Update Russian (thanks, Yuriy Talakan'; closes: #367143).
3169 - Update Czech (thanks, Miroslav Kure; closes: #367161).
3170 - Update Italian (thanks, Luca Monducci; closes: #367186).
3171 - Update Galician (thanks, Jacobo Tarrio; closes: #367318).
3172 - Update Swedish (thanks, Daniel Nylander; closes: #367971).
3173
3174 -- Colin Watson <cjwatson@debian.org> Fri, 19 May 2006 09:14:27 +0100
3175
3176openssh (1:4.3p2-1) unstable; urgency=low
3177
3178 * New upstream release (closes: #361032).
3179 - CVE-2006-0225: scp (as does rcp, on which it is based) invoked a
3180 subshell to perform local to local, and remote to remote copy
3181 operations. This subshell exposed filenames to shell expansion twice;
3182 allowing a local attacker to create filenames containing shell
3183 metacharacters that, if matched by a wildcard, could lead to execution
3184 of attacker-specified commands with the privilege of the user running
3185 scp (closes: #349645).
3186 - Add support for tunneling arbitrary network packets over a connection
3187 between an OpenSSH client and server via tun(4) virtual network
3188 interfaces. This allows the use of OpenSSH (4.3+) to create a true VPN
3189 between the client and server providing real network connectivity at
3190 layer 2 or 3. This feature is experimental.
3191 - Reduce default key length for new DSA keys generated by ssh-keygen
3192 back to 1024 bits. DSA is not specified for longer lengths and does
3193 not fully benefit from simply making keys longer. As per FIPS 186-2
3194 Change Notice 1, ssh-keygen will refuse to generate a new DSA key
3195 smaller or larger than 1024 bits.
3196 - Fixed X forwarding failing to start when the X11 client is executed in
3197 background at the time of session exit.
3198 - Change ssh-keygen to generate a protocol 2 RSA key when invoked
3199 without arguments (closes: #114894).
3200 - Fix timing variance for valid vs. invalid accounts when attempting
3201 Kerberos authentication.
3202 - Ensure that ssh always returns code 255 on internal error
3203 (closes: #259865).
3204 - Cleanup wtmp files on SIGTERM when not using privsep.
3205 - Set SO_REUSEADDR on X11 listeners to avoid problems caused by
3206 lingering sockets from previous session (X11 applications can
3207 sometimes not connect to 127.0.0.1:60xx) (closes:
3208 https://launchpad.net/bugs/25528).
3209 - Ensure that fds 0, 1 and 2 are always attached in all programs, by
3210 duping /dev/null to them if necessary.
3211 - Xauth list invocation had bogus "." argument.
3212 - Remove internal assumptions on key exchange hash algorithm and output
3213 length, preparing OpenSSH for KEX methods with alternate hashes.
3214 - Ignore junk sent by a server before it sends the "SSH-" banner.
3215 - Many manual page improvements.
3216 - Lots of cleanups, including fixes to memory leaks on error paths and
3217 possible crashes.
3218 * Update to current GSSAPI patch from
3219 http://www.sxw.org.uk/computing/patches/openssh-4.3p2-gsskex-20060223.patch
3220 (closes: #352042).
3221 * debian/rules: Resynchronise CFLAGS with that generated by configure.
3222 * Restore pam_nologin to /etc/pam.d/ssh; sshd no longer checks this itself
3223 when PAM is enabled, but relies on PAM to do it.
3224 * Rename KeepAlive to TCPKeepAlive in default sshd_config
3225 (closes: #349896).
3226 * Rephrase ssh/new_config and ssh/encrypted_host_key_but_no_keygen debconf
3227 templates to make boolean short descriptions end with a question mark
3228 and to avoid use of the first person.
3229 * Ship README.tun.
3230 * Policy version 3.7.2: no changes required.
3231 * debconf template translations:
3232 - Update Italian (thanks, Luca Monducci; closes: #360348).
3233 - Add Galician (thanks, Jacobo Tarrio; closes: #361220).
3234
3235 -- Colin Watson <cjwatson@debian.org> Fri, 12 May 2006 12:48:24 +0100
3236
3237openssh (1:4.2p1-8) unstable; urgency=low
3238
3239 [ Frans Pop ]
3240 * Use udeb support introduced in debhelper 4.2.0 (available in sarge)
3241 rather than constructing udebs by steam.
3242 * Require debhelper 5.0.22, which generates correct shared library
3243 dependencies for udebs (closes: #360068). This build-dependency can be
3244 ignored if building on sarge.
3245
3246 [ Colin Watson ]
3247 * Switch to debhelper compatibility level 4, since we now require
3248 debhelper 4 even on sarge anyway for udeb support.
3249
3250 -- Colin Watson <cjwatson@debian.org> Fri, 31 Mar 2006 09:44:55 +0100
3251
3252openssh (1:4.2p1-7) unstable; urgency=low
3253
3254 * I accidentally applied the default $PATH change in 1:4.2p1-6 to the udeb
3255 rather than the deb. Fixed.
3256
3257 -- Colin Watson <cjwatson@debian.org> Wed, 1 Mar 2006 16:19:00 +0000
3258
3259openssh (1:4.2p1-6) unstable; urgency=low
3260
3261 * Sync default values of $PATH from shadow 1:4.0.12-6, adding /usr/bin/X11
3262 to the normal and superuser paths and /usr/games to the normal path.
3263 * When the client receives a signal, don't fatal() with "Killed by signal
3264 %d." (which produces unhelpful noise on stderr and causes confusion for
3265 users of some applications that wrap ssh); instead, generate a debug
3266 message and exit with the traditional status (closes: #313371).
3267 * debconf template translations:
3268 - Add Swedish (thanks, Daniel Nylander; closes: #333133).
3269 - Update Spanish (thanks, Javier Fernández-Sanguino Peña;
3270 closes: #341371).
3271 - Correct erroneously-changed Last-Translator headers in Greek and
3272 Spanish translations.
3273
3274 -- Colin Watson <cjwatson@debian.org> Mon, 20 Feb 2006 16:50:55 +0000
3275
3276openssh (1:4.2p1-5) unstable; urgency=low
3277
3278 * Add a CVE name to the 1:4.0p1-1 changelog entry.
3279 * Build-depend on libselinux1-dev on armeb.
3280 * Only send GSSAPI proposal if GSSAPIAuthentication is enabled.
3281 * Build-depend on libssl-dev (>= 0.9.8-1) to cope with surprise OpenSSL
3282 transition, since otherwise who knows what the buildds will do. If
3283 you're building openssh yourself, you can safely ignore this and use an
3284 older libssl-dev.
3285
3286 -- Colin Watson <cjwatson@debian.org> Fri, 7 Oct 2005 12:23:42 +0100
3287
3288openssh (1:4.2p1-4) unstable; urgency=low
3289
3290 * Initialise token to GSS_C_EMPTY_BUFFER in ssh_gssapi_check_mechanism
3291 (closes: #328606).
3292
3293 -- Colin Watson <cjwatson@debian.org> Fri, 16 Sep 2005 12:50:16 +0100
3294
3295openssh (1:4.2p1-3) unstable; urgency=low
3296
3297 * Add prototype for ssh_gssapi_server_mechanisms (closes: #328372).
3298 * Interoperate with ssh-krb5 << 3.8.1p1-1 servers, which used a slightly
3299 different version of the gssapi authentication method (thanks, Aaron M.
3300 Ucko; closes: #328388).
3301 * Explicitly tell po2debconf to use the 'popular' output encoding, so that
3302 the woody-compatibility hack works even with po-debconf 0.9.0.
3303
3304 -- Colin Watson <cjwatson@debian.org> Thu, 15 Sep 2005 09:28:21 +0100
3305
3306openssh (1:4.2p1-2) unstable; urgency=low
3307
3308 * Annotate 1:4.2p1-1 changelog with CVE references.
3309 * Add remaining pieces of Kerberos support (closes: #152657, #275472):
3310 - Add GSSAPI key exchange support from
3311 http://www.sxw.org.uk/computing/patches/openssh.html (thanks, Stephen
3312 Frost).
3313 - Build-depend on libkrb5-dev and configure --with-kerberos5=/usr.
3314 - openssh-client and openssh-server replace ssh-krb5.
3315 - Update commented-out Kerberos/GSSAPI options in default sshd_config.
3316 - Fix HAVE_GSSAPI_KRB5_H/HAVE_GSSAPI_GSSAPI_KRB5_H typos in
3317 gss-serv-krb5.c.
3318
3319 -- Colin Watson <cjwatson@debian.org> Wed, 14 Sep 2005 18:28:49 +0100
3320
3321openssh (1:4.2p1-1) unstable; urgency=low
3322
3323 * New upstream release.
3324 - SECURITY (CAN-2005-2797): Fix a bug introduced in OpenSSH 4.0 that
3325 caused GatewayPorts to be incorrectly activated for dynamic ("-D")
3326 port forwardings when no listen address was explicitly specified
3327 (closes: #326065).
3328 - SECURITY (CAN-2005-2798): Fix improper delegation of GSSAPI
3329 credentials. This code is only built in openssh-krb5, not openssh, but
3330 I mention the CVE reference here anyway for completeness.
3331 - Add a new compression method ("Compression delayed") that delays zlib
3332 compression until after authentication, eliminating the risk of zlib
3333 vulnerabilities being exploited by unauthenticated users. Note that
3334 users of OpenSSH versions earlier than 3.5 will need to disable
3335 compression on the client or set "Compression yes" (losing this
3336 security benefit) on the server.
3337 - Increase the default size of new RSA/DSA keys generated by ssh-keygen
3338 from 1024 to 2048 bits (closes: #181162).
3339 - Many bugfixes and improvements to connection multiplexing.
3340 - Don't pretend to accept $HOME (closes: #208648).
3341 * debian/rules: Resynchronise CFLAGS with that generated by configure.
3342 * openssh-client and openssh-server conflict with pre-split ssh to avoid
3343 problems when ssh is left un-upgraded (closes: #324695).
3344 * Set X11Forwarding to yes in the default sshd_config (new installs only).
3345 At least when X11UseLocalhost is turned on, which is the default, the
3346 security risks of using X11 forwarding are risks to the client, not to
3347 the server (closes: #320104).
3348
3349 -- Colin Watson <cjwatson@debian.org> Wed, 14 Sep 2005 15:16:14 +0100
3350
3351openssh (1:4.1p1-7) unstable; urgency=low
3352
3353 * Do the IDEA host key check on a temporary file to avoid altering
3354 /etc/ssh/ssh_host_key itself (closes: #312312).
3355 * Work around the ssh-askpass alternative somehow ending up in manual mode
3356 pointing to the obsolete /usr/lib/ssh/gnome-ssh-askpass.
3357 * Add GNU/kFreeBSD support (thanks, Aurelien Jarno; closes: #318113).
3358 * Fix XSIish uses of 'test' in openssh-server.preinst.
3359 * Policy version 3.6.2: no changes required.
3360
3361 -- Colin Watson <cjwatson@debian.org> Fri, 2 Sep 2005 16:18:11 +0100
3362
3363openssh (1:4.1p1-6) unstable; urgency=low
3364
3365 * Fix one-character typo that meant the binaries in openssh-client and
3366 openssh-server got recompiled with the wrong options during
3367 'debian/rules install' (closes: #317088, #317238, #317241).
3368
3369 -- Colin Watson <cjwatson@debian.org> Thu, 7 Jul 2005 10:56:16 +0100
3370
3371openssh (1:4.1p1-5) unstable; urgency=low
3372
3373 * Build-depend on libselinux1-dev on ppc64 too (closes: #314625).
3374 * Drop priority of ssh to extra to match the override file.
3375 * Make /usr/share/doc/openssh-server and /usr/share/doc/ssh symlinks to
3376 /usr/share/doc/openssh-client (closes: #314745).
3377 * Ship README.dns (closes: #284874).
3378 * Disable btmp logging, since Debian's /var/log/btmp has inappropriate
3379 permissions (closes: #314956).
3380 * Allow ~/.ssh/config to be group-writable, provided that the group in
3381 question contains only the file's owner (closes: #314347).
3382 * debconf template translations:
3383 - Update Brazilian Portuguese (thanks, André Luís Lopes;
3384 closes: #315477).
3385 - Add Vietnamese (thanks, Clytie Siddall; closes: #316636).
3386
3387 -- Colin Watson <cjwatson@debian.org> Sun, 3 Jul 2005 17:08:08 +0100
3388
3389openssh (1:4.1p1-4) unstable; urgency=low
3390
3391 * openssh-client and openssh-server conflict with ssh-krb5, as ssh-krb5
3392 only conflicts with ssh (closes: #312475).
3393 * SELinux support (thanks, Manoj Srivastava; closes: #308555):
3394 - Added SELinux capability, and turned it on be default. Added
3395 restorecon calls in preinst and postinst (should not matter if the
3396 machine is not SELinux aware). By and large, the changes made should
3397 have no effect unless the rules file calls --with-selinux; and even
3398 then there should be no performance hit for machines not actively
3399 running SELinux.
3400 - Modified the preinst and postinst to call restorecon to set the
3401 security context for the generated public key files.
3402 - Added a comment to /etc/pam.d/ssh to indicate that an SELinux system
3403 may want to also include pam_selinux.so.
3404 * Re-enable ssh-askpass-gnome on the Hurd, now that its build-dependencies
3405 are available.
3406 * Restore /usr/lib/sftp-server temporarily, as a symlink to
3407 /usr/lib/openssh/sftp-server (closes: #312891).
3408 * Switch to debhelper compatibility level 3, since 2 is deprecated.
3409 * debconf template translations:
3410 - Update German (thanks, Jens Seidel; closes: #313949).
3411
3412 -- Colin Watson <cjwatson@debian.org> Fri, 17 Jun 2005 14:20:20 +0100
3413
3414openssh (1:4.1p1-3) unstable; urgency=low
3415
3416 * Upload to unstable.
3417
3418 -- Colin Watson <cjwatson@debian.org> Mon, 6 Jun 2005 22:28:33 +0100
3419
3420openssh (1:4.1p1-2) experimental; urgency=low
3421
3422 * Drop debconf support for allowing SSH protocol 1, which is discouraged
3423 and has not been the default since openssh 1:3.0.1p1-1. Users who need
3424 this should edit sshd_config instead (closes: #147212).
3425 * Since ssh-keysign isn't used by default (you need to set
3426 EnableSSHKeysign to "yes" in /etc/ssh/ssh_config), having a debconf
3427 question to ask whether it should be setuid is overkill, and the
3428 question text had got out of date anyway. Remove this question, ship
3429 ssh-keysign setuid in openssh-client.deb, and set a statoverride if the
3430 debconf question was previously set to false.
3431 * Add lintian overrides for the above (setuid-binary,
3432 no-debconf-templates).
3433 * Fix picky lintian errors about slogin symlinks.
3434 * Fix DEB_HOST_ARCH_OS/DEB_HOST_GNU_SYSTEM compatibility handling.
3435 * Apply Linux 2.2 workaround (see #239999) only on Linux.
3436
3437 -- Colin Watson <cjwatson@debian.org> Thu, 2 Jun 2005 00:55:58 +0100
3438
3439openssh (1:4.1p1-1) experimental; urgency=low
3440
3441 * New upstream release.
3442 - Normalise socket addresses returned by get_remote_hostname(), fixing
3443 4-in-6 mapping issues with AllowUsers et al (closes: #192234).
3444 * Take upstream's hint and disable the unsupported USE_POSIX_THREADS
3445 (closes: #295757, #308868, and possibly others; may open other bugs).
3446 Use PAM password authentication to avoid #278394. In future I may
3447 provide two sets of binaries built with and without this option, since
3448 it seems I can't win.
3449 * Disable ChallengeResponseAuthentication in new installations, returning
3450 to PasswordAuthentication by default, since it now supports PAM and
3451 apparently works better with a non-threaded sshd (closes: #247521).
3452 * openssh-server Suggests: rssh (closes: #233012).
3453 * Change libexecdir to /usr/lib/openssh, and fix up various alternatives
3454 and configuration files to match (closes: #87900, #151321).
3455 * Fix up very old sshd_config files that refer to /usr/libexec/sftp-server
3456 (closes: #141979).
3457
3458 -- Colin Watson <cjwatson@debian.org> Tue, 31 May 2005 01:33:33 +0100
3459
3460openssh (1:4.0p1-1) experimental; urgency=low
3461
3462 * New upstream release.
3463 - Port-forwarding specifications now take optional bind addresses, and
3464 the server allows client-specified bind addresses for remote port
3465 forwardings when configured with "GatewayPorts clientspecified"
3466 (closes: #87253, #192206).
3467 - ssh and ssh-keyscan now support hashing of known_hosts files for
3468 improved privacy (CAN-2005-2666). ssh-keygen has new options for
3469 managing known_hosts files, which understand hashing.
3470 - sftp supports command history and editing support using libedit
3471 (closes: #287013).
3472 - Have scp and sftp wait for the spawned ssh to exit before they exit
3473 themselves, allowing ssh to restore terminal modes (closes: #257130).
3474 - Improved the handling of bad data in authorized_keys files,
3475 eliminating fatal errors on corrupt or very large keys; e.g. linefeeds
3476 in keys only produce errors in auth.log now (closes: #220726).
3477 - Add "command mode" to ssh connection multiplexing (closes: #303452).
3478 - Mention $HOME/.hushlogin in sshd(8) FILES section (closes: #163933).
3479 * Make gnome-ssh-askpass stay above other windows (thanks, Liyang HU;
3480 closes: #296487).
3481 * Remove obsolete and unnecessary ssh/forward_warning debconf note.
3482 * Hurd build fixes (although sshd still doesn't work):
3483 - Restore X forwarding fix from #102991, lost somewhere along the way.
3484 - Link with -lcrypt.
3485 - Link with -lpthread rather than -pthread.
3486 - Don't build ssh-askpass-gnome on the Hurd, until GNOME is available to
3487 satisfy build-dependencies.
3488 * Drop workaround for #242462 on amd64; it's been fixed properly upstream.
3489 * Enable HashKnownHosts by default. This only affects new entries; use
3490 'ssh-keygen -H' to convert an entire known_hosts file to hashed format.
3491 * Note in ssh_config(5) that the SetupTimeOut option is Debian-specific
3492 (closes: #307069).
3493 * debconf template translations:
3494 - Update Czech (thanks, Miroslav Kure; closes: #298744).
3495 - Update Finnish (thanks, Matti Pöllä; closes: #303787).
3496 - Synchronise Spanish with sarge branch (thanks, Javier
3497 Fernández-Sanguino Peña; closes: #298536).
3498 - Add Ukrainian (thanks, Eugeniy Meshcheryakov; closes: #301852).
3499
3500 -- Colin Watson <cjwatson@debian.org> Thu, 26 May 2005 11:23:18 +0100
3501
3502openssh (1:3.9p1-3) experimental; urgency=low
3503
3504 * Explain how to run sshd from inittab in README.Debian (closes: #147360).
3505 * Add debian/watch file.
3506
3507 -- Colin Watson <cjwatson@debian.org> Fri, 18 Feb 2005 00:20:16 +0000
3508
3509openssh (1:3.9p1-2) experimental; urgency=low
3510
3511 * Remove pam_nologin from /etc/pam.d/ssh, as sshd's built-in support
3512 appears to be sufficient and more useful (closes: #162996).
3513 * Depend on debconf | debconf-2.0.
3514 * Drop LoginGraceTime back to the upstream default of two minutes on new
3515 installs (closes: #289573).
3516 * debconf template translations from Ubuntu bug #1232:
3517 - Update Greek (thanks, Logiotatidis George).
3518 - Update Spanish (thanks, Santiago Erquicia).
3519
3520 -- Colin Watson <cjwatson@debian.org> Sat, 15 Jan 2005 12:37:54 +0000
3521
3522openssh (1:3.9p1-1) experimental; urgency=low
3523
3524 * New upstream release.
3525 - PAM password authentication implemented again (closes: #238699,
3526 #242119).
3527 - Implemented the ability to pass selected environment variables between
3528 the client and the server.
3529 - Fix ssh-keyscan breakage when remote server doesn't speak SSH protocol
3530 (closes: #228828).
3531 - Fix res_query detection (closes: #242462).
3532 - 'ssh -c' documentation improved (closes: #265627).
3533 * Pass LANG and LC_* environment variables from the client by default, and
3534 accept them to the server by default in new installs, although not on
3535 upgrade (closes: #264024).
3536 * Build ssh in binary-indep, not binary-arch (thanks, LaMont Jones).
3537 * Expand on openssh-client package description (closes: #273831).
3538
3539 -- Colin Watson <cjwatson@debian.org> Tue, 4 Jan 2005 14:18:31 +0000
3540
3541openssh (1:3.8.1p1-14) experimental; urgency=low
3542
3543 * We use DH_COMPAT=2, so build-depend on debhelper (>= 2).
3544 * Fix timing information leak allowing discovery of invalid usernames in
3545 PAM keyboard-interactive authentication (backported from a patch by
3546 Darren Tucker; closes: #281595).
3547 * Make sure that there's a delay in PAM keyboard-interactive
3548 authentication when PermitRootLogin is not set to yes and the correct
3549 root password is entered (closes: #248747).
3550
3551 -- Colin Watson <cjwatson@debian.org> Sun, 28 Nov 2004 18:09:37 +0000
3552
3553openssh (1:3.8.1p1-13) experimental; urgency=low
3554
3555 * Enable threading for PAM, on Sam Hartman's advice (closes: #278394).
3556 * debconf template translations:
3557 - Update Dutch (thanks, cobaco; closes: #278715).
3558 * Correct README.Debian's ForwardX11Trusted description (closes: #280190).
3559
3560 -- Colin Watson <cjwatson@debian.org> Fri, 12 Nov 2004 12:03:13 +0000
3561
3562openssh (1:3.8.1p1-12) experimental; urgency=low
3563
3564 * Preserve /etc/ssh/sshd_config ownership/permissions (closes: #276754).
3565 * Shorten the version string from the form "OpenSSH_3.8.1p1 Debian
3566 1:3.8.1p1-8.sarge.1" to "OpenSSH_3.8.1p1 Debian-8.sarge.1", as some SSH
3567 implementations apparently have problems with the long version string.
3568 This is of course a bug in those implementations, but since the extent
3569 of the problem is unknown it's best to play safe (closes: #275731).
3570 * debconf template translations:
3571 - Add Finnish (thanks, Matti Pöllä; closes: #265339).
3572 - Update Danish (thanks, Morten Brix Pedersen; closes: #275895).
3573 - Update French (thanks, Denis Barbier; closes: #276703).
3574 - Update Japanese (thanks, Kenshi Muto; closes: #277438).
3575
3576 -- Colin Watson <cjwatson@debian.org> Sun, 24 Oct 2004 19:21:17 +0100
3577
3578openssh (1:3.8.1p1-11) experimental; urgency=high
3579
3580 * Move sshd_config(5) to openssh-server, where it belongs.
3581 * If PasswordAuthentication is disabled, then offer to disable
3582 ChallengeResponseAuthentication too. The current PAM code will attempt
3583 password-style authentication if ChallengeResponseAuthentication is
3584 enabled (closes: #250369).
3585 * This will ask a question of anyone who installed fresh with 1:3.8p1-2 or
3586 later and then upgraded. Sorry about that ... for this reason, the
3587 default answer is to leave ChallengeResponseAuthentication enabled.
3588
3589 -- Colin Watson <cjwatson@debian.org> Wed, 6 Oct 2004 14:28:20 +0100
3590
3591openssh (1:3.8.1p1-10) experimental; urgency=low
3592
3593 * Don't install the ssh-askpass-gnome .desktop file by default; I've had
3594 too many GNOME people tell me it's the wrong thing to be doing. I've
3595 left it in /usr/share/doc/ssh-askpass-gnome/examples/ for now.
3596
3597 -- Colin Watson <cjwatson@debian.org> Wed, 25 Aug 2004 18:18:14 +0100
3598
3599openssh (1:3.8.1p1-9) experimental; urgency=low
3600
3601 * Split the ssh binary package into openssh-client and openssh-server
3602 (closes: #39741). openssh-server depends on openssh-client for some
3603 common functionality; it didn't seem worth creating yet another package
3604 for this. openssh-client is priority standard, openssh-server optional.
3605 * New transitional ssh package, priority optional, depending on
3606 openssh-client and openssh-server. May be removed once nothing depends
3607 on it.
3608 * When upgrading from ssh to openssh-{client,server}, it's very difficult
3609 for the maintainer scripts to find out what version we're upgrading from
3610 without dodgy dpkg hackery. I've therefore taken the opportunity to move
3611 a couple of debconf notes into NEWS files, namely ssh/ssh2_keys_merged
3612 and ssh/user_environment_tell.
3613 * Add a heuristic to try to make sure the sshd_config upgrade to >= 3.7
3614 happens even though we don't know what version we're upgrading from.
3615 * Remove /etc/ssh/sshd_not_to_be_run on purge of openssh-server. For now
3616 (until sarge+2) it's still honoured to avoid breaking existing
3617 configurations, but the right approach is now to remove the
3618 openssh-server package if you don't want to run the server. Add a NEWS
3619 item to that effect.
3620
3621 -- Colin Watson <cjwatson@debian.org> Mon, 2 Aug 2004 20:48:54 +0100
3622
3623openssh (1:3.8.1p1-8.sarge.4) unstable; urgency=high
3624
3625 * Fix timing information leak allowing discovery of invalid usernames in
3626 PAM keyboard-interactive authentication (backported from a patch by
3627 Darren Tucker; closes: #281595).
3628 * Make sure that there's a delay in PAM keyboard-interactive
3629 authentication when PermitRootLogin is not set to yes and the correct
3630 root password is entered (closes: #248747).
3631
3632 -- Colin Watson <cjwatson@debian.org> Sun, 28 Nov 2004 12:37:16 +0000
3633
3634openssh (1:3.8.1p1-8.sarge.3) unstable; urgency=low
3635
3636 * Enable threading for PAM, on Sam Hartman's advice (closes: #278394).
3637 * debconf template translations:
3638 - Update Dutch (thanks, cobaco; closes: #278715).
3639 * Correct README.Debian's ForwardX11Trusted description (closes: #280190).
3640
3641 -- Colin Watson <cjwatson@debian.org> Fri, 12 Nov 2004 10:31:12 +0000
3642
3643openssh (1:3.8.1p1-8.sarge.2) unstable; urgency=low
3644
3645 * Preserve /etc/ssh/sshd_config ownership/permissions (closes: #276754).
3646 * Shorten the version string from the form "OpenSSH_3.8.1p1 Debian
3647 1:3.8.1p1-8.sarge.1" to "OpenSSH_3.8.1p1 Debian-8.sarge.1", as some SSH
3648 implementations apparently have problems with the long version string.
3649 This is of course a bug in those implementations, but since the extent
3650 of the problem is unknown it's best to play safe (closes: #275731).
3651 * debconf template translations:
3652 - Add Finnish (thanks, Matti Pöllä; closes: #265339).
3653 - Update Danish (thanks, Morten Brix Pedersen; closes: #275895).
3654 - Update French (thanks, Denis Barbier; closes: #276703).
3655 - Update Japanese (thanks, Kenshi Muto; closes: #277438).
3656
3657 -- Colin Watson <cjwatson@debian.org> Sun, 24 Oct 2004 17:57:14 +0100
3658
3659openssh (1:3.8.1p1-8.sarge.1) unstable; urgency=high
3660
3661 * If PasswordAuthentication is disabled, then offer to disable
3662 ChallengeResponseAuthentication too. The current PAM code will attempt
3663 password-style authentication if ChallengeResponseAuthentication is
3664 enabled (closes: #250369).
3665 * This will ask a question of anyone who installed fresh with 1:3.8p1-2 or
3666 later and then upgraded. Sorry about that ... for this reason, the
3667 default answer is to leave ChallengeResponseAuthentication enabled.
3668
3669 -- Colin Watson <cjwatson@debian.org> Wed, 6 Oct 2004 14:21:55 +0100
3670
3671openssh (1:3.8.1p1-8) unstable; urgency=high
3672
3673 * Matthew Vernon:
3674 - Add a GPL exception to the licensing terms of the Debian patch
3675 (closes: #211644).
3676
3677 -- Colin Watson <cjwatson@debian.org> Thu, 29 Jul 2004 13:28:47 +0100
3678
3679openssh (1:3.8.1p1-7) unstable; urgency=low
3680
3681 * Re-enable shadow password support in openssh-server-udeb, at Bastian
3682 Blank's request (closes: #260800).
3683
3684 -- Colin Watson <cjwatson@debian.org> Thu, 22 Jul 2004 10:56:06 +0100
3685
3686openssh (1:3.8.1p1-6) unstable; urgency=low
3687
3688 * Implement hack in
3689 http://lists.debian.org/debian-boot/2004/07/msg01207.html to get
3690 openssh-client-udeb to show up as a retrievable debian-installer
3691 component.
3692 * Generate host keys in postinst only if the relevant HostKey directives
3693 are found in sshd_config (closes: #87946).
3694
3695 -- Colin Watson <cjwatson@debian.org> Wed, 21 Jul 2004 15:14:46 +0100
3696
3697openssh (1:3.8.1p1-5) unstable; urgency=medium
3698
3699 * Update German debconf template translation (thanks, Helge Kreutzmann;
3700 closes: #252226).
3701 * Remove Suggests: dnsutils, as it was only needed for
3702 make-ssh-known-hosts (#93265), which has been replaced by ssh-keyscan.
3703 * Disable shadow password support in openssh-server-udeb.
3704 * Fix non-portable shell constructs in maintainer scripts, Makefile, and
3705 ssh-copy-id (thanks, David Weinehall; closes: #258517).
3706 * Apply patch from Darren Tucker to make the PAM authentication SIGCHLD
3707 handler kill the PAM thread if its waitpid() call returns 0, as well as
3708 the previous check for -1 (closes: #252676).
3709 * Add scp and sftp to openssh-client-udeb. It might not be very 'u' any
3710 more; oh well.
3711
3712 -- Colin Watson <cjwatson@debian.org> Sat, 10 Jul 2004 13:57:27 +0100
3713
3714openssh (1:3.8.1p1-4) unstable; urgency=medium
3715
3716 * Kill off PAM thread if privsep slave dies (closes: #248125).
3717
3718 -- Colin Watson <cjwatson@debian.org> Fri, 28 May 2004 17:58:45 -0300
3719
3720openssh (1:3.8.1p1-3) unstable; urgency=low
3721
3722 * Add ssh-keygen to openssh-server-udeb.
3723
3724 -- Colin Watson <cjwatson@debian.org> Thu, 20 May 2004 16:31:52 +0100
3725
3726openssh (1:3.8.1p1-2) unstable; urgency=low
3727
3728 * Add Catalan debconf template translation (thanks, Aleix Badia i Bosch;
3729 closes: #248748).
3730 * openssh-client-udeb and openssh-server-udeb depend on libnss-files-udeb
3731 (not yet uploaded).
3732 * Restore ssh-askpass-gnome binary, lost by mistake.
3733 * Don't link against libnsl in udeb builds.
3734
3735 -- Colin Watson <cjwatson@debian.org> Thu, 20 May 2004 11:15:58 +0100
3736
3737openssh (1:3.8.1p1-1) unstable; urgency=low
3738
3739 * New upstream release.
3740 - Use a longer buffer for tty names in utmp (closes: #247538).
3741 * Make sure there's a newline at the end of sshd_config before adding
3742 'UsePAM yes' (closes: #244829).
3743 * Generate a new .orig.tar.gz without RFC.nroff, and remove
3744 /usr/share/doc/ssh/RFC.gz (closes: #211640). It isn't DFSG-free and only
3745 documents the obsolete SSH1 protocol, not to mention that it was never a
3746 real RFC but only an Internet-Draft. It's available from
3747 http://www.free.lp.se/bamse/draft-ylonen-ssh-protocol-00.txt if you want
3748 it for some reason.
3749 * Add openssh-client-udeb and openssh-server-udeb binary packages for use
3750 in debian-installer. They still need libnss_files to be supplied in udeb
3751 form by glibc.
3752 * Work around lack of res_query weak alias in libresolv on amd64 (see
3753 #242462, awaiting real fix upstream).
3754 * Fix grammar in sshd(8) (closes: #238753).
3755 * Add .desktop file and icon for ssh-askpass-gnome (closes: #232333).
3756 * Update Polish debconf template translation (thanks, Emil Nowak;
3757 closes: #242808).
3758 * Add Turkish debconf template translation (thanks, Recai Oktaş;
3759 closes: #246068).
3760
3761 -- Colin Watson <cjwatson@debian.org> Tue, 11 May 2004 23:38:10 +0100
3762
3763openssh (1:3.8p1-3) unstable; urgency=low
3764
3765 * Remove deprecated ReverseMappingCheck option from newly generated
3766 sshd_config files (closes: #239987).
3767 * Build everything apart from contrib in a subdirectory, to allow for
3768 multiple builds.
3769 * Some older kernels are missing setresuid() and setresgid(), so don't try
3770 to use them. setreuid() and setregid() will do well enough for our
3771 purposes (closes: #239999).
3772
3773 -- Colin Watson <cjwatson@debian.org> Mon, 5 Apr 2004 21:23:43 +0100
3774
3775openssh (1:3.8p1-2) unstable; urgency=medium
3776
3777 * Disable PasswordAuthentication for new installations (closes: #236810).
3778 * Turn off the new ForwardX11Trusted by default, returning to the
3779 semantics of 3.7 and earlier, since it seems immature and causes far too
3780 many problems with existing setups. See README.Debian for details
3781 (closes: #237021).
3782
3783 -- Colin Watson <cjwatson@debian.org> Wed, 10 Mar 2004 10:33:07 +0000
3784
3785openssh (1:3.8p1-1) unstable; urgency=low
3786
3787 * New upstream release (closes: #232281):
3788 - New PAM implementation based on that in FreeBSD. This runs PAM session
3789 modules before dropping privileges (closes: #132681, #150968).
3790 - Since PAM session modules are run as root, we can turn pam_limits back
3791 on by default, and it no longer spits out "Operation not permitted" to
3792 syslog (closes: #171673).
3793 - Password expiry works again (closes: #153235).
3794 - 'ssh -q' suppresses login banner (closes: #134589).
3795 - sshd doesn't lie to PAM about invalid usernames (closes: #157078).
3796 - ssh-add prints key comment on each prompt (closes: #181869).
3797 - Punctuation formatting fixed in man pages (closes: #191131).
3798 - EnableSSHKeysign documented in ssh_config(5) (closes: #224457).
3799 * Add 'UsePAM yes' to /etc/ssh/sshd_config on upgrade from versions older
3800 than this, to maintain the standard Debian sshd configuration.
3801 * Comment out PAMAuthenticationViaKbdInt and RhostsAuthentication in
3802 sshd_config on upgrade. Neither option is supported any more.
3803 * Privilege separation and PAM are now properly supported together, so
3804 remove both debconf questions related to them and simply set it
3805 unconditionally in newly generated sshd_config files (closes: #228838).
3806 * ServerAliveInterval implemented upstream, so ProtocolKeepAlives is now a
3807 compatibility alias. The semantics differ slightly, though; see
3808 ssh_config(5) for details.
3809 * Implement SSH1 support for ServerAliveInterval using SSH_MSG_IGNORE. As
3810 documented in ssh_config(5), it's not as good as the SSH2 version.
3811 * Remove -fno-builtin-log, -DHAVE_MMAP_ANON_SHARED, and
3812 -D__FILE_OFFSET_BITS=64 compiler options, which are no longer necessary.
3813 * Update config.guess and config.sub from autotools-dev 20040105.1.
3814 * Darren Tucker:
3815 - Reset signal status when starting pam auth thread, prevent hanging
3816 during PAM keyboard-interactive authentications.
3817 - Fix a non-security-critical segfault in PAM authentication.
3818 * Add debconf template translations:
3819 - Greek (thanks, Konstantinos Margaritis; closes: #232843).
3820 - Italian (thanks, Renato Gini; closes: #234777).
3821
3822 -- Colin Watson <cjwatson@debian.org> Sat, 6 Mar 2004 18:43:44 +0000
3823
3824openssh (1:3.6.1p2-12) unstable; urgency=low
3825
3826 * Update Spanish debconf template translation (thanks, Javier
3827 Fernández-Sanguino Peña; closes: #228242).
3828 * Add debconf template translations:
3829 - Czech (thanks, Miroslav Kure; closes: #230110).
3830 - Simplified Chinese (thanks, Hiei Xu; closes: #230726).
3831
3832 -- Colin Watson <cjwatson@debian.org> Wed, 11 Feb 2004 09:37:57 +0000
3833
3834openssh (1:3.6.1p2-11) unstable; urgency=low
3835
3836 * Comment out pam_limits in default configuration, for now at least
3837 (closes: #198254).
3838 * Use invoke-rc.d (if it exists) to run the init script.
3839 * Backport format string bug fix in sshconnect.c (closes: #225238).
3840 * ssh-copy-id exits if ssh fails (closes: #215252).
3841
3842 -- Colin Watson <cjwatson@debian.org> Sun, 4 Jan 2004 18:59:21 +0000
3843
3844openssh (1:3.6.1p2-10) unstable; urgency=low
3845
3846 * Use --retry in init script when restarting rather than sleeping, to make
3847 sure the old process is dead (thanks, Herbert Xu; closes: #212117).
3848 Depend on dpkg (>= 1.9.0) for start-stop-daemon's --retry option.
3849 * Update debconf template translations:
3850 - Brazilian Portuguese (thanks, Andre Luis Lopes; closes: #219844).
3851 - Danish (thanks, Morten Brix Pedersen; closes: #217964).
3852 - Japanese (thanks, Kenshi Muto; closes: #212497).
3853 - Russian (thanks, Ilgiz Kalmetev).
3854 - Spanish (thanks, Carlos Valdivia Yagüe; closes: #211832).
3855 * Add Dutch debconf template translation (thanks, cobaco;
3856 closes: #215372).
3857 * Update config.guess and config.sub from autotools-dev 20031007.1
3858 (closes: #217696).
3859 * Implement New World Order for PAM configuration, including
3860 /etc/pam.d/common-* from /etc/pam.d/ssh (closes: #212959).
3861 - To backport this release to woody, you need to set DEB_BUILD_SSH_WOODY
3862 in your environment. See README.Debian.
3863 * Add more commentary to /etc/pam.d/ssh.
3864
3865 -- Colin Watson <cjwatson@debian.org> Sun, 16 Nov 2003 01:14:16 +0000
3866
3867openssh (1:3.6.1p2-9) unstable; urgency=high
3868
3869 * Merge even more buffer allocation fixes from upstream (CAN-2003-0682;
3870 closes: #211434).
3871
3872 -- Colin Watson <cjwatson@debian.org> Fri, 19 Sep 2003 10:25:25 +0100
3873
3874openssh (1:3.6.1p2-8) unstable; urgency=high
3875
3876 * Merge more buffer allocation fixes from new upstream version 3.7.1p1
3877 (closes: #211324).
3878
3879 -- Colin Watson <cjwatson@debian.org> Wed, 17 Sep 2003 03:07:19 +0100
3880
3881openssh (1:3.6.1p2-7) unstable; urgency=high
3882
3883 * Update debconf template translations:
3884 - French (thanks, Christian Perrier; closes: #208801).
3885 - Japanese (thanks, Kenshi Muto; closes: #210380).
3886 * Some small improvements to the English templates courtesy of Christian
3887 Perrier. I've manually unfuzzied a few translations where it was
3888 obvious, on Christian's advice, but the others will have to be updated.
3889 * Document how to generate an RSA1 host key (closes: #141703).
3890 * Incorporate NMU fix for early buffer expansion vulnerability,
3891 CAN-2003-0693 (closes: #211205). Thanks to Michael Stone.
3892
3893 -- Colin Watson <cjwatson@debian.org> Tue, 16 Sep 2003 14:32:28 +0100
3894
3895openssh (1:3.6.1p2-6.0) unstable; urgency=high
3896
3897 * SECURITY: fix for CAN-2003-0693, buffer allocation error
3898
3899 -- Michael Stone <mstone@debian.org> Tue, 16 Sep 2003 08:27:07 -0400
3900
3901openssh (1:3.6.1p2-6) unstable; urgency=medium
3902
3903 * Use a more CVS-friendly means of setting SSH_VERSION.
3904 * Update Brazilian Portuguese debconf template translation (thanks, Andre
3905 Luis Lopes; closes: #208036).
3906 * Don't run 'sshd -t' in init script if the server isn't to be run
3907 (closes: #197576).
3908 * Fix login delay, spurious auth.log entry, and PermitRootLogin
3909 information leakage due to PAM issues with upstream's recent security
3910 update (thanks, Darren Tucker; closes: #99168, #192207, #193546).
3911 * Policy version 3.6.1: recode this changelog to UTF-8.
3912
3913 -- Colin Watson <cjwatson@debian.org> Wed, 3 Sep 2003 19:14:02 +0100
3914
3915openssh (1:3.6.1p2-5) unstable; urgency=low
3916
3917 * Disable cmsg_type check for file descriptor passing when running on
3918 Linux 2.0 (closes: #150976). Remove comments about non-functional
3919 privilege separation on 2.0 from ssh/privsep_ask and ssh/privsep_tell
3920 debconf questions and from README.Debian, since it should all now work.
3921 * Fix "defails" typo in generated sshd_config (closes: #206484).
3922 * Backport upstream patch to strip trailing whitespace (including
3923 newlines) from configuration directives (closes: #192079).
3924
3925 -- Colin Watson <cjwatson@debian.org> Wed, 27 Aug 2003 02:19:57 +0100
3926
3927openssh (1:3.6.1p2-4) unstable; urgency=low
3928
3929 * getent can get just one key; no need to use grep (thanks, James Troup).
3930 * Move /usr/local/bin to the front of the default path, following
3931 /etc/login.defs (closes: #201150).
3932 * Remove specifics of problematic countries from package description
3933 (closes: #197040).
3934 * Update Spanish debconf template translation (thanks, Carlos Valdivia
3935 Yagüe; closes: #198456).
3936 * Backport upstream patch to pass monitor signals through to child
3937 (closes: #164797).
3938
3939 -- Colin Watson <cjwatson@debian.org> Sun, 27 Jul 2003 17:31:15 +0100
3940
3941openssh (1:3.6.1p2-3) unstable; urgency=low
3942
3943 * Update French debconf template translation (thanks, Christian Perrier;
3944 closes: #194323).
3945 * Version the adduser dependency for --no-create-home (closes: #195756).
3946 * Add a version of moduli(5), namely revision 1.7 of
3947 http://www.openbsd.org/cgi-bin/cvsweb/src/share/man/man5/moduli.5 with
3948 '/etc/moduli' changed to '/etc/ssh/moduli' throughout (closes: #196061).
3949
3950 -- Colin Watson <cjwatson@debian.org> Mon, 9 Jun 2003 02:51:35 +0100
3951
3952openssh (1:3.6.1p2-2) unstable; urgency=low
3953
3954 * Force /etc/default/ssh to be non-executable, since dpkg apparently
3955 doesn't deal with permissions changes on conffiles (closes: #192966).
3956 * Use debconf 0.5's seen flag rather than the deprecated isdefault.
3957 * Add GPL location to copyright file.
3958 * Remove debian/postinst.old.
3959 * Switch to po-debconf, with some careful manual use of po2debconf to
3960 ensure that the source package continues to build smoothly on woody
3961 (closes: #183986).
3962 * Update debconf template translations:
3963 - Brazilian Portugese (thanks, Andre Luis Lopes; see #183986).
3964 - Japanese (thanks, Tomohiro KUBOTA; closes: #192429).
3965 * Compile with -fno-builtin-log for now, otherwise gcc-3.3 complains
3966 "log.h:59: warning: conflicting types for built-in function `log'". The
3967 OpenSSH log() function has been renamed in upstream CVS.
3968
3969 -- Colin Watson <cjwatson@debian.org> Mon, 19 May 2003 01:52:38 +0100
3970
3971openssh (1:3.6.1p2-1) unstable; urgency=medium
3972
3973 * New upstream release, including fix for PAM user-discovery security hole
3974 (closes: #191681).
3975 * Fix ChallengeResponseAuthentication default in generated sshd_config
3976 (closes: #106037).
3977 * Put newlines after full stops in man page documentation for
3978 ProtocolKeepAlives and SetupTimeOut.
3979 * Policy version 3.5.9: support DEB_BUILD_OPTIONS=noopt, build
3980 gnome-ssh-askpass with -g and -Wall flags.
3981 * Really ask ssh/new_config debconf question before trying to fetch its
3982 value (closes: #188721).
3983 * On purge, remove only the files we know about in /etc/ssh rather than
3984 the whole thing, and remove the directory if that leaves it empty
3985 (closes: #176679).
3986 * ssh has depended on debconf for some time now with no complaints, so:
3987 - Simplify the postinst by relying on debconf being present. (The absent
3988 case was buggy anyway.)
3989 - Get rid of "if you have not installed debconf" text in README.Debian,
3990 and generally update the "/usr/bin/ssh not SUID" entry.
3991 * More README.Debian work:
3992 - Reorganize into "UPGRADE ISSUES" and "OTHER ISSUES", in an effort to
3993 make it easier for people to find the former. The upgrade issues
3994 should probably be sorted by version somehow.
3995 - Document X11UseLocalhost under "X11 Forwarding" (closes: #150913).
3996 * Fix setting of IP flags for interactive sessions (upstream bug #541).
3997
3998 -- Colin Watson <cjwatson@debian.org> Mon, 5 May 2003 17:47:40 +0100
3999
4000openssh (1:3.6.1p1-1) unstable; urgency=low
4001
4002 * New upstream release (thanks, Laurence J. Lane).
4003 * debian/control: ssh-askpass-gnome is now Section: gnome, following the
4004 override file.
4005
4006 -- Colin Watson <cjwatson@debian.org> Wed, 2 Apr 2003 00:51:02 +0100
4007
4008openssh (1:3.6p1-1) unstable; urgency=low
4009
4010 * New upstream release.
4011 - Workaround applied upstream for a bug in the interaction of glibc's
4012 getaddrinfo() with the Linux 2.2 kernel (closes: #155814).
4013 - As such, it should now be safe to remove --with-ipv4-default, so
4014 starting sshd with -6 is no longer necessary (closes: #79861 and lots
4015 of other merged bugs).
4016 - ssh-copy-id prints usage when run without arguments (closes: #71376).
4017 - scp exits 1 if ssh fails (closes: #138400).
4018 - sshd writes to utmp's ut_addr_v6 field in IPv6 mode (closes: #167867).
4019 - 'ssh-add -c' causes ssh-agent to ask the user each time a key is used
4020 (closes: #109795).
4021 * Install /etc/default/ssh non-executable (closes: #185537).
4022
4023 -- Colin Watson <cjwatson@debian.org> Mon, 31 Mar 2003 23:00:59 +0100
4024
4025openssh (1:3.5p1-5) unstable; urgency=low
4026
4027 * Add /etc/default/ssh (closes: #161049).
4028 * Run the init script under 'set -e' (closes: #175010).
4029 * Change the default superuser path to include /sbin, /usr/sbin, and
4030 /usr/local/sbin (closes: #128235, #151267). Using login.defs would be
4031 nice, but that belongs to another package. Without a defined API to
4032 retrieve its settings, parsing it is off-limits.
4033 * Build ssh-askpass-gnome with GNOME 2. The source package should still
4034 support building on stable with GNOME 1, using the alternate
4035 libgnome-dev build-dependency (thanks, Colin Walters; closes: #167582).
4036
4037 -- Colin Watson <cjwatson@debian.org> Sun, 9 Mar 2003 20:12:10 +0000
4038
4039openssh (1:3.5p1-4) unstable; urgency=low
4040
4041 * Point rlogin and rcp alternatives at slogin and scp respectively rather
4042 than ssh (closes: #121103, #151666). Fix alternative removal to match;
4043 previously it was completely wrong anyway.
4044 * Find out whether /etc/ssh/sshd_not_to_be_run exists and set the debconf
4045 question's default using that information, rather than using debconf as
4046 a registry. Other solutions may be better in the long run, but this is
4047 at least correct (thanks, Matthew Woodcraft; closes: #84725).
4048 * Stop using pam_lastlog, as it doesn't currently work well as a session
4049 module when privilege separation is enabled; it can usually read
4050 /var/log/lastlog but can't write to it. Instead, just use sshd's
4051 built-in support, already enabled by default (closes: #151297, #169938).
4052 * Use 'ssh-keygen -q' rather than redirecting output to /dev/null.
4053 * Add a "this may take some time" warning when creating host keys on
4054 installation (part of #110094).
4055 * When restarting via the init script, check for sshd_not_to_be_run after
4056 stopping sshd (idea from Tomas Pospisek; closes: #149850).
4057 * Append /usr/sbin:/sbin to the init script's $PATH, just in case of
4058 strangeness (closes: #115138).
4059 * Fix a dpkg-statoverride call to redirect stdout to /dev/null, not
4060 stderr.
4061 * Correct copyright file typo: "orignal" -> "original" (closes: #176490).
4062 * Rebuild with libssl0.9.7 (closes: #176983).
4063 * We're up to policy version 3.5.6. DEB_BUILD_OPTIONS stuff still needs to
4064 be looked at.
4065
4066 -- Colin Watson <cjwatson@debian.org> Sat, 18 Jan 2003 01:37:23 +0000
4067
4068openssh (1:3.5p1-3) unstable; urgency=low
4069
4070 * Happy new year!
4071 * Use getent rather than id to find out whether the sshd user exists
4072 (closes: #150974).
4073 * Remove some duplication from the postinst's ssh-keysign setuid code.
4074 * Replace db_text with db_input throughout debian/config. (db_text has
4075 been a compatibility wrapper since debconf 0.1.5.)
4076 * Warn about PermitUserEnvironment on upgrade (closes: #167895).
4077 * Use 'make install-nokeys', and disable unused debhelper commands,
4078 thereby forward-porting the last pieces of Zack Weinberg's patch
4079 (closes: #68341).
4080 * Move the man page for gnome-ssh-askpass from the ssh package to
4081 ssh-askpass-gnome (closes: #174449).
4082 * Build with -DLOGIN_NO_ENDOPT, since Debian's /bin/login doesn't accept
4083 '--' to terminate the list of options (closes: #171554).
4084 * Add Jonathan Amery's ssh-argv0 script (closes: #111341).
4085 * Update Danish debconf template (thanks, Morten Brix Pedersen;
4086 closes: #174757).
4087 * Document setgid ssh-agent's effect on certain environment variables in
4088 README.Debian (closes: #167974).
4089 * Document interoperability problems between scp and ssh.com's server in
4090 README.Debian, and suggest some workarounds (closes: #174662).
4091
4092 -- Colin Watson <cjwatson@debian.org> Wed, 1 Jan 2003 14:18:30 +0000
4093
4094openssh (1:3.5p1-2) unstable; urgency=low
4095
4096 * Mention in the ssh package description that it provides both ssh and
4097 sshd (closes: #99680).
4098 * Create a system group for ssh-agent, not a user group (closes: #167669).
4099
4100 -- Colin Watson <cjwatson@debian.org> Mon, 4 Nov 2002 13:43:53 +0000
4101
4102openssh (1:3.5p1-1) unstable; urgency=low
4103
4104 * New upstream release.
4105 - Fixes typo in ssh-add usage (closes: #152239).
4106 - Fixes 'PermitRootLogin forced-commands-only' (closes: #166184).
4107 - ~/.ssh/environment and environment= options in ~/.ssh/authorized_keys
4108 are deprecated for security reasons and will eventually go away. For
4109 now they can be re-enabled by setting 'PermitUserEnvironment yes' in
4110 sshd_config.
4111 - ssh-agent is installed setgid to prevent ptrace() attacks. The group
4112 actually doesn't matter, as it drops privileges immediately, but to
4113 avoid confusion the postinst creates a new 'ssh' group for it.
4114 * Obsolete patches:
4115 - Solar Designer's privsep+compression patch for Linux 2.2 (see
4116 1:3.3p1-0.0woody1).
4117 - Hostbased auth ssh-keysign backport (see 1:3.4p1-4).
4118
4119 * Remove duplicated phrase in ssh_config(5) (closes: #152404).
4120 * Source the debconf confmodule at the top of the postrm rather than at
4121 the bottom, to avoid making future non-idempotency problems worse (see
4122 #151035).
4123 * Debconf templates:
4124 - Add Polish (thanks, Grzegorz Kusnierz).
4125 - Update French (thanks, Denis Barbier; closes: #132509).
4126 - Update Spanish (thanks, Carlos Valdivia Yagüe; closes: #164716).
4127 * Write a man page for gnome-ssh-askpass, and link it to ssh-askpass.1 if
4128 this is the selected ssh-askpass alternative (closes: #67775).
4129
4130 -- Colin Watson <cjwatson@debian.org> Sat, 26 Oct 2002 19:41:51 +0100
4131
4132openssh (1:3.4p1-4) unstable; urgency=low
4133
4134 * Allow ssh-krb5 in ssh-askpass-gnome's dependencies (closes: #129532).
4135 * Restore Russia to list of countries where encryption is problematic (see
4136 #148951 and http://www.average.org/freecrypto/).
4137 * Drop ssh-askpass-gnome's priority to optional, per the override file.
4138 * Drop the PAM special case for hurd-i386 (closes: #99157).
4139 * s/dile/idle/ in ssh_config(5) (closes: #118331).
4140 * Note in README.Debian that you need xauth from xbase-clients on the
4141 server for X11 forwarding (closes: #140269).
4142 * Use correct path to upstream README in copyright file (closes: #146037).
4143 * Document the units for ProtocolKeepAlives (closes: #159479).
4144 * Backport upstream patch to fix hostbased auth (closes: #117114).
4145 * Add -g to CFLAGS.
4146
4147 -- Colin Watson <cjwatson@debian.org> Sun, 13 Oct 2002 18:58:53 +0100
4148
4149openssh (1:3.4p1-3) unstable; urgency=low
4150
4151 * Add myself to Uploaders: and begin acting as temporary maintainer, at
4152 Matthew's request. (Normal service will resume in some months' time.)
4153 * Add sharutils to Build-Depends (closes: #138465).
4154 * Stop creating the /usr/doc/ssh symlink.
4155
4156 * Fix some debconf template typos (closes: #160358).
4157 * Split debconf templates into one file per language.
4158 * Add debconf template translations:
4159 - Brazilian Portuguese (thanks, Andre Luis Lopes; closes: #106173).
4160 - Danish (thanks, Claus Hindsgaul; closes: #126607).
4161 - Japanese (thanks, Tomohiro KUBOTA; closes: #137427).
4162 - Russian (thanks, Ilgiz Kalmetev; closes: #136610).
4163 - Spanish (thanks, Carlos Valdivia Yagüe; closes: #129041).
4164 * Update debconf template translations:
4165 - French (thanks, Igor Genibel; closes: #151361).
4166 - German (thanks, Axel Noetzold; closes: #147069).
4167 * Some of these translations are fuzzy. Please send updates.
4168
4169 -- Colin Watson <cjwatson@debian.org> Sun, 13 Oct 2002 14:09:57 +0100
4170
4171openssh (1:3.4p1-2) unstable; urgency=high
4172
4173 * Get a security-fixed version into unstable
4174 * Also tidy README.Debian up a little
4175
4176 -- Matthew Vernon <matthew@debian.org> Fri, 28 Jun 2002 17:20:59 +0100
4177
4178openssh (1:3.4p1-1) testing; urgency=high
4179
4180 * Extend my tendrils back into this package (Closes: #150915, #151098)
4181 * thanks to the security team for their work
4182 * no thanks to ISS/Theo de Raadt for their handling of these bugs
4183 * save old sshd_configs to sshd_config.dpkg-old when auto-generating a
4184 new one
4185 * tell/ask the user about PriviledgeSeparation
4186 * /etc/init.d/ssh run will now create the chroot empty dir if necessary
4187 * Remove our previous statoverride on /usr/bin/ssh (only for people
4188 upgrading from a version where we'd put one in ourselves!)
4189 * Stop slandering Russia, since someone asked so nicely (Closes: #148951)
4190 * Reduce the sleep time in /etc/init.d/ssh during a restart
4191
4192 -- Matthew Vernon <matthew@debian.org> Fri, 28 Jun 2002 15:52:10 +0100
4193
4194openssh (1:3.4p1-0.0woody1) testing-security; urgency=high
4195
4196 * NMU by the security team.
4197 * New upstream version
4198
4199 -- Michael Stone <mstone@debian.org> Wed, 26 Jun 2002 15:40:38 -0400
4200
4201openssh (1:3.3p1-0.0woody4) testing-security; urgency=high
4202
4203 * NMU by the security team.
4204 * fix error when /etc/ssh/sshd_config exists on new install
4205 * check that user doesn't exist before running adduser
4206 * use openssl internal random unconditionally
4207
4208 -- Michael Stone <mstone@debian.org> Tue, 25 Jun 2002 19:44:39 -0400
4209
4210openssh (1:3.3p1-0.0woody3) testing-security; urgency=high
4211
4212 * NMU by the security team.
4213 * use correct home directory when sshd user is created
4214
4215 -- Michael Stone <mstone@debian.org> Tue, 25 Jun 2002 08:59:50 -0400
4216
4217openssh (1:3.3p1-0.0woody2) testing-security; urgency=high
4218
4219 * NMU by the security team.
4220 * Fix rsa1 key creation (Closes: #150949)
4221 * don't fail if sshd user removal fails
4222 * depends: on adduser (Closes: #150907)
4223
4224 -- Michael Stone <mstone@debian.org> Tue, 25 Jun 2002 08:59:50 -0400
4225
4226openssh (1:3.3p1-0.0woody1) testing-security; urgency=high
4227
4228 * NMU by the security team.
4229 * New upstream version.
4230 - Enable privilege separation by default.
4231 * Include patch from Solar Designer for privilege separation and
4232 compression on 2.2.x kernels.
4233 * Remove --disable-suid-ssh from configure.
4234 * Support setuid ssh-keysign binary instead of setuid ssh client.
4235 * Check sshd configuration before restarting.
4236
4237 -- Daniel Jacobowitz <dan@debian.org> Mon, 24 Jun 2002 13:43:44 -0400
4238
4239openssh (1:3.0.2p1-9) unstable; urgency=high
4240
4241 * Thanks to those who NMUd
4242 * The only change in this version is to debian/control - I've removed
4243 the bit that says you can't export it from the US - it would look
4244 pretty daft to say this about a package in main! Also, it's now OK
4245 to use crypto in France, so I've edited that comment slightly
4246 * Correct a path in README.Debian too (Closes: #138634)
4247
4248 -- Matthew Vernon <matthew@debian.org> Sun, 4 Apr 2002 09:52:59 +0100
4249
4250openssh (1:3.0.2p1-8.3) unstable; urgency=medium
4251
4252 * NMU
4253 * Really set urgency to medium this time (oops)
4254 * Fix priority to standard per override while I'm at it
4255
4256 -- Aaron M. Ucko <ucko@debian.org> Sun, 24 Mar 2002 09:00:08 -0500
4257
4258openssh (1:3.0.2p1-8.2) unstable; urgency=low
4259
4260 * NMU with maintainer's permission
4261 * Prepare for upcoming ssh-nonfree transitional packages per
4262 <http://lists.debian.org/debian-ssh/2002/debian-ssh-200203/msg00008.html>
4263 * Urgency medium because it would really be good to get this into woody
4264 before it releases
4265 * Fix sections to match override file
4266 * Reissued due to clash with non-US -> main move
4267
4268 -- Aaron M. Ucko <ucko@debian.org> Sat, 23 Mar 2002 21:21:52 -0500
4269
4270openssh (1:3.0.2p1-8.1) unstable; urgency=low
4271
4272 * NMU
4273 * Move from non-US to mani
4274
4275 -- LaMont Jones <lamont@debian.org> Thu, 21 Mar 2002 09:33:50 -0700
4276
4277openssh (1:3.0.2p1-8) unstable; urgency=critical
4278
4279 * Security fix - patch from upstream (Closes: #137209, #137210)
4280 * Undo the changes in the unreleased -7, since they appear to break
4281 things here. Accordingly, the code change is minimal, and I'm
4282 happy to get it into testing ASAP
4283
4284 -- Matthew Vernon <matthew@debian.org> Thu, 7 Mar 2002 14:25:23 +0000
4285
4286openssh (1:3.0.2p1-7) unstable; urgency=high
4287
4288 * Build to support IPv6 and IPv4 by default again
4289
4290 -- Matthew Vernon <matthew@debian.org> Sat, 2 Mar 2002 00:25:05 +0000
4291
4292openssh (1:3.0.2p1-6) unstable; urgency=high
4293
4294 * Correct error in the clean target (Closes: #130868)
4295
4296 -- Matthew Vernon <matthew@debian.org> Sat, 26 Jan 2002 00:32:00 +0000
4297
4298openssh (1:3.0.2p1-5) unstable; urgency=medium
4299
4300 * Include the Debian version in our identification, to make it easier to
4301 audit networks for patched versions in future
4302
4303 -- Matthew Vernon <matthew@debian.org> Mon, 21 Jan 2002 17:16:10 +0000
4304
4305openssh (1:3.0.2p1-4) unstable; urgency=medium
4306
4307 * If we're asked to not run sshd, stop any running sshd's first
4308 (Closes: #129327)
4309
4310 -- Matthew Vernon <matthew@debian.org> Wed, 16 Jan 2002 21:24:16 +0000
4311
4312openssh (1:3.0.2p1-3) unstable; urgency=high
4313
4314 * Fix /etc/pam.d/ssh to not set $MAIL (Closes: #128913)
4315 * Remove extra debconf suggestion (Closes: #128094)
4316 * Mmm. speedy bug-fixing :-)
4317
4318 -- Matthew Vernon <matthew@debian.org> Sat, 12 Jan 2002 17:23:58 +0000
4319
4320openssh (1:3.0.2p1-2) unstable; urgency=high
4321
4322 * Fix postinst to not automatically overwrite sshd_config (!)
4323 (Closes: #127842, #127867)
4324 * Add section in README.Debian about the PermitRootLogin setting
4325
4326 -- Matthew Vernon <matthew@debian.org> Sat, 5 Jan 2003 05:26:30 +0000
4327
4328openssh (1:3.0.2p1-1) unstable; urgency=high
4329
4330 * Incorporate fix from Colin's NMU
4331 * New upstream version (fixes the bug Wichert fixed) (Closes: #124035)
4332 * Capitalise IETF (Closes: #125379)
4333 * Refer to the correct sftp-server location (Closes: #126854, #126224)
4334 * Do what we're asked re SetUID ssh (Closes: #124065, #124154, #123247)
4335 * Ask people upgrading from potato if they want a new conffile
4336 (Closes: #125642)
4337 * Fix a typo in postinst (Closes: #122192, #122410, #123440)
4338 * Frob the default config a little (Closes: #122284, #125827, #125696,
4339 #123854)
4340 * Make /etc/init.d/ssh be more clear about ssh not running (Closes:
4341 #123552)
4342 * Fix typo in templates file (Closes: #123411)
4343
4344 -- Matthew Vernon <matthew@debian.org> Fri, 4 Jan 2002 16:01:52 +0000
4345
4346openssh (1:3.0.1p1-1.2) unstable; urgency=high
4347
4348 * Non-maintainer upload
4349 * Prevent local users from passing environment variables to the login
4350 process when UseLogin is enabled
4351
4352 -- Wichert Akkerman <wakkerma@debian.org> Mon, 3 Dec 2001 19:34:45 +0100
4353
4354openssh (1:3.0.1p1-1.1) unstable; urgency=low
4355
4356 * Non-maintainer upload, at Matthew's request.
4357 * Remove sa_restorer assignment to fix compilation on alpha, hppa, and
4358 ia64 (closes: #122086).
4359
4360 -- Colin Watson <cjwatson@debian.org> Sun, 2 Dec 2001 18:54:16 +0000
4361
4362openssh (1:3.0.1p1-1) unstable; urgency=high
4363
4364 * New upstream version (Closes: #113646, #113513, #114707, #118564)
4365 * Building with a libc that works (!) (Closes: #115228)
4366 * Patches forward-ported are -1/-2 options for scp, the improvement to
4367 'waiting for forwarded connections to terminate...'
4368 * Fix /etc/init.d/ssh to stop sshd properly (Closes: #115228)
4369 * /etc/ssh/sshd_config is no longer a conffile but generated in the postinst
4370 * Remove suidregister leftover from postrm
4371 * Mention key we are making in the postinst
4372 * Default to not enable SSH protocol 1 support, since protocol 2 is
4373 much safer anyway.
4374 * New version of the vpn-fixes patch, from Ian Jackson
4375 * New handling of -q, and added new -qq option; thanks to Jon Amery
4376 * Experimental smartcard support not enabled, since I have no way of
4377 testing it.
4378
4379 -- Matthew Vernon <matthew@debian.org> Thu, 28 Nov 2001 17:43:01 +0000
4380
4381openssh (1:2.9p2-6) unstable; urgency=low
4382
4383 * check for correct file in /etc/init.d/ssh (Closes: #110876)
4384 * correct location of version 2 keys in ssh.1 (Closes: #110439)
4385 * call update-alternatives --quiet (Closes: #103314)
4386 * hack ssh-copy-id to chmod go-w (Closes: #95551)
4387 * TEMPORARY fix to provide largefile support using a -D in the cflags
4388 line. long-term, upstream will patch the autoconf stuff
4389 (Closes: #106809, #111849)
4390 * remove /etc/rc references in ssh-keygen.1 (Closes: #68350)
4391 * scp.1 patch from Adam McKenna to document -r properly (Closes: #76054)
4392 * Check for files containing a newline character (Closes: #111692)
4393
4394 -- Matthew Vernon <matthew@debian.org> Thu, 13 Sep 2001 16:47:36 +0100
4395
4396openssh (1:2.9p2-5) unstable; urgency=high
4397
4398 * Thanks to all the bug-fixers who helped!
4399 * remove sa_restorer assignment (Closes: #102837)
4400 * patch from Peter Benie to DTRT wrt X forwarding if the server refuses
4401 us access (Closes: #48297)
4402 * patch from upstream CVS to fix port forwarding (Closes: #107132)
4403 * patch from Jonathan Amery to document ssh-keygen behaviour
4404 (Closes:#106643, #107512)
4405 * patch to postinst from Jonathan Amery (Closes: #106411)
4406 * patch to manpage from Jonathan Amery (Closes: #107364)
4407 * patch from Matthew Vernon to make -q emit fatal errors as that is the
4408 documented behaviour (Closes: #64347)
4409 * patch from Ian Jackson to cause us to destroy a file when we scp it
4410 onto itself, rather than dumping bits of our memory into it, which was
4411 a security hole (see #51955)
4412 * patch from Jonathan Amery to document lack of Kerberos support
4413 (Closes: #103726)
4414 * patch from Matthew Vernon to make the 'waiting for connections to
4415 terminate' message more helpful (Closes: #50308)
4416
4417 -- Matthew Vernon <matthew@debian.org> Thu, 23 Aug 2001 02:14:09 +0100
4418
4419openssh (1:2.9p2-4) unstable; urgency=high
4420
4421 * Today's build of ssh is strawberry flavoured
4422 * Patch from mhp to reduce length of time sshd is stopped for (Closes: #106176)
4423 * Tidy up debconf template (Closes: #106152)
4424 * If called non-setuid, then setgid()'s failure should not be fatal (see
4425 #105854)
4426
4427 -- Matthew Vernon <matthew@debian.org> Sun, 22 Jul 2001 14:19:43 +0100
4428
4429openssh (1:2.9p2-3) unstable; urgency=low
4430
4431 * Patch from yours truly to add -1 and -2 options to scp (Closes: #106061)
4432 * Improve the IdentityFile section in the man page (Closes: #106038)
4433
4434 -- Matthew Vernon <matthew@debian.org> Sat, 21 Jul 2001 14:47:27 +0100
4435
4436openssh (1:2.9p2-2) unstable; urgency=low
4437
4438 * Document the protocol version 2 and IPV6 changes (Closes: #105845, #105868)
4439 * Make PrintLastLog 'no' by default (Closes: #105893)
4440
4441 -- Matthew Vernon <matthew@debian.org> Thu, 19 Jul 2001 18:36:41 +0100
4442
4443openssh (1:2.9p2-1) unstable; urgency=low
4444
4445 * new (several..) upstream version (Closes: #96726, #81856, #96335)
4446 * Hopefully, this will close some other bugs too
4447
4448 -- Matthew Vernon <matthew@debian.org> Tue, 17 Jul 2001 19:41:58 +0100
4449
4450openssh (1:2.5.2p2-3) unstable; urgency=low
4451
4452 * Taking Over this package
4453 * Patches from Robert Bihlmeyer for the Hurd (Closes: #102991)
4454 * Put PermitRootLogin back to yes (Closes: #67334, #67371, #78274)
4455 * Don't fiddle with conf-files any more (Closes: #69501)
4456
4457 -- Matthew Vernon <matthew@debian.org> Tue, 03 Jul 2001 02:58:13 +0100
4458
4459openssh (1:2.5.2p2-2.2) unstable; urgency=low
4460
4461 * NMU
4462 * Include Hurd compatibility patches from Robert Bihlmeyer (Closes: #76033)
4463 * Patch from Richard Kettlewell for protocolkeepalives (Closes: #99273)
4464 * Patch from Matthew Vernon for BannerTimeOut, batchmode, and
4465 documentation for protocolkeepalives. Makes ssh more generally useful
4466 for scripting uses (Closes: #82877, #99275)
4467 * Set a umask, so ourpidfile isn't world-writable (closes: #100012,
4468 #98286, #97391)
4469
4470 -- Matthew Vernon <matthew@debian.org> Thu, 28 Jun 2001 23:15:42 +0100
4471
4472openssh (1:2.5.2p2-2.1) unstable; urgency=low
4473
4474 * NMU
4475 * Remove duplicate Build-Depends for libssl096-dev and change it to
4476 depend on libssl-dev instaed. Also adding in virtual | real package
4477 style build-deps. (Closes: #93793, #75228)
4478 * Removing add-log entry (Closes: #79266)
4479 * This was a pam bug from a while back (Closes: #86908, #88457, #86843)
4480 * pam build-dep already exists (Closes: #93683)
4481 * libgnome-dev build-dep already exists (Closes: #93694)
4482 * No longer in non-free (Closes: #85401)
4483 * Adding in fr debconf translations (Closes: #83783)
4484 * Already suggests xbase-clients (Closes: #79741)
4485 * No need to suggest libpam-pwdb anymore (Closes: #81658)
4486 * Providing rsh-client (Closes: #79437)
4487 * hurd patch was already applied (Closes: #76033)
4488 * default set to no (Closes: #73682)
4489 * Adding in a suggests for dnsutils (Closes: #93265)
4490 * postinst bugs fixed (Closes: #88057, #88066, #88196, #88405, #88612)
4491 (Closes: #88774, #88196, #89556, #90123, #90228, #90833, #87814, #85465)
4492 * Adding in debconf dependency
4493
4494 -- Ivan E. Moore II <rkrusty@debian.org> Mon, 16 Apr 2001 14:11:04 +0100
4495
4496openssh (1:2.5.2p2-2) unstable; urgency=high
4497
4498 * disable the OpenSSL version check in entropy.c
4499 (closes: #93581, #93588, #93590, #93614, #93619, #93635, #93648)
4500
4501 -- Philip Hands <phil@uk.alcove.com> Wed, 11 Apr 2001 20:30:04 +0100
4502
4503openssh (1:2.5.2p2-1) unstable; urgency=low
4504
4505 * New upstream release
4506 * removed make-ssh-known-hosts, since ssh-keyscan does that job (closes: #86069, #87748)
4507 * fix double space indent in german templates (closes: #89493)
4508 * make postinst check for ssh_host_rsa_key
4509 * get rid of the last of the misguided debian/rules NMU debris :-/
4510
4511 -- Philip Hands <phil@hands.com> Sat, 24 Mar 2001 20:59:33 +0000
4512
4513openssh (1:2.5.1p2-2) unstable; urgency=low
4514
4515 * rebuild with new debhelper (closes: #89558, #89536, #90225)
4516 * fix broken dpkg-statoverride test in postinst
4517 (closes: #89612, #90474, #90460, #89605)
4518 * NMU bug fixed but not closed in last upload (closes: #88206)
4519
4520 -- Philip Hands <phil@hands.com> Fri, 23 Mar 2001 16:11:33 +0000
4521
4522openssh (1:2.5.1p2-1) unstable; urgency=high
4523
4524 * New upstream release
4525 * fix typo in postinst (closes: #88110)
4526 * revert to setting PAM service name in debian/rules, backing out last
4527 NMU, which also (closes: #88101)
4528 * restore the pam lastlog/motd lines, lost during the NMUs, and sshd_config
4529 * restore printlastlog option patch
4530 * revert to using debhelper, which had been partially disabled in NMUs
4531
4532 -- Philip Hands <phil@hands.com> Tue, 13 Mar 2001 01:41:34 +0000
4533
4534openssh (1:2.5.1p1-1.8) unstable; urgency=high
4535
4536 * And now the old pam-bug s/sshd/ssh in ssh.c is also fixed
4537
4538 -- Christian Kurz <shorty@debian.org> Thu, 1 Mar 2001 19:48:01 +0100
4539
4540openssh (1:2.5.1p1-1.7) unstable; urgency=high
4541
4542 * And now we mark the correct binary as setuid, when a user requested
4543 to install it setuid.
4544
4545 -- Christian Kurz <shorty@debian.org> Thu, 1 Mar 2001 07:19:56 +0100
4546
4547openssh (1:2.5.1p1-1.6) unstable; urgency=high
4548
4549 * Fixes postinst to handle overrides that are already there. Damn, I
4550 should have noticed the bug earlier.
4551
4552 -- Christian Kurz <shorty@debian.org> Wed, 28 Feb 2001 22:35:00 +0100
4553
4554openssh (1:2.5.1p1-1.5) unstable; urgency=high
4555
4556 * Rebuild ssh with pam-support.
4557
4558 -- Christian Kurz <shorty@debian.org> Mon, 26 Feb 2001 21:55:51 +0100
4559
4560openssh (1:2.5.1p1-1.4) unstable; urgency=low
4561
4562 * Added Build-Depends on libssl096-dev.
4563 * Fixed sshd_config file to disallow root logins again.
4564
4565 -- Christian Kurz <shorty@debian.org> Sun, 25 Feb 2001 20:03:55 +0100
4566
4567openssh (1:2.5.1p1-1.3) unstable; urgency=low
4568
4569 * Fixed missing manpages for sftp.1 and ssh-keyscan.1
4570 * Made package policy 3.5.2 compliant.
4571
4572 -- Christian Kurz <shorty@debian.org> Sun, 25 Feb 2001 15:46:26 +0100
4573
4574openssh (1:2.5.1p1-1.2) unstable; urgency=low
4575
4576 * Added Conflict with sftp, since we now provide our own sftp-client.
4577 * Added a fix for our broken dpkg-statoverride call in the
4578 2.3.0p1-13.
4579 * Fixed some config pathes in the comments of sshd_config.
4580 * Removed ssh-key-exchange-vulnerability-patch since it's not needed
4581 anymore because upstream included the fix.
4582
4583 -- Christian Kurz <shorty@debian.org> Sun, 25 Feb 2001 13:46:58 +0100
4584
4585openssh (1:2.5.1p1-1.1) unstable; urgency=high
4586
4587 * Another NMU to get the new upstream version 2.5.1p1 into
4588 unstable. (Closes: #87123)
4589 * Corrected postinst to mark ssh as setuid. (Closes: #86391, #85766)
4590 * Key Exchange patch is already included by upstream. (Closes: #86015)
4591 * Upgrading should be possible now. (Closes: #85525, #85523)
4592 * Added --disable-suid-ssh as compile option, so ssh won't get installed
4593 suid per default.
4594 * Fixed postinst to run dpkg-statoverride only, when dpkg-statoverride
4595 is available and the mode of the binary should be 4755. And also added
4596 suggestion for a newer dpkg.
4597 (Closes: #85734, #85741, #86876)
4598 * sftp and ssh-keyscan will also be included from now on. (Closes: #79994)
4599 * scp now understands spaces in filenames (Closes: #53783, #58958,
4600 #66723)
4601 * ssh-keygen now supports showing DSA fingerprints. (Closes: #68623)
4602 * ssh doesn' t show motd anymore when switch -t is used. (Closes #69035)
4603 * ssh supports the usage of other dsa keys via the ssh command line
4604 options. (Closes: #81250)
4605 * Documentation in sshd_config fixed. (Closes: #81088)
4606 * primes file included by upstream and included now. (Closes: #82101)
4607 * scp now allows dots in the username. (Closes: #82477)
4608 * Spelling error in ssh-copy-id.1 corrected by upstream. (Closes: #78124)
4609
4610 -- Christian Kurz <shorty@debian.org> Sun, 25 Feb 2001 10:06:08 +0100
4611
4612openssh (1:2.3.0p1-1.13) unstable; urgency=low
4613
4614 * Config should now also be fixed with this hopefully last NMU.
4615
4616 -- Christian Kurz <shorty@debian.org> Sat, 10 Feb 2001 22:56:36 +0100
4617
4618openssh (1:2.3.0p1-1.12) unstable; urgency=high
4619
4620 * Added suggest for xbase-clients to control-file. (Closes #85227)
4621 * Applied patch from Markus Friedl to fix a vulnerability in
4622 the rsa keyexchange.
4623 * Fixed position of horizontal line. (Closes: #83613)
4624 * Fixed hopefully the grep problem in the config-file. (Closes: #78802)
4625 * Converted package from suidregister to dpkg-statoverride.
4626
4627 -- Christian Kurz <shorty@debian.org> Fri, 9 Feb 2001 19:43:55 +0100
4628
4629openssh (1:2.3.0p1-1.11) unstable; urgency=medium
4630
4631 * Fixed some typos in the german translation of the debconf
4632 template.
4633
4634 -- Christian Kurz <shorty@debian.org> Wed, 24 Jan 2001 18:22:38 +0100
4635
4636openssh (1:2.3.0p1-1.10) unstable; urgency=medium
4637
4638 * Fixed double printing of motd. (Closes: #82618)
4639
4640 -- Christian Kurz <shorty@debian.org> Tue, 23 Jan 2001 21:03:43 +0100
4641
4642openssh (1:2.3.0p1-1.9) unstable; urgency=high
4643
4644 * And the next NMU which includes the patch from Andrew Bartlett
4645 and Markus Friedl to fix the root privileges handling of openssh.
4646 (Closes: #82657)
4647
4648 -- Christian Kurz <shorty@debian.org> Wed, 17 Jan 2001 22:20:54 +0100
4649
4650openssh (1:2.3.0p1-1.8) unstable; urgency=high
4651
4652 * Applied fix from Ryan Murray to allow building on other architectures
4653 since the hurd patch was wrong. (Closes: #82471)
4654
4655 -- Christian Kurz <shorty@debian.org> Tue, 16 Jan 2001 22:45:51 +0100
4656
4657openssh (1:2.3.0p1-1.7) unstable; urgency=medium
4658
4659 * Fixed another typo on sshd_config
4660
4661 -- Christian Kurz <shorty@debian.org> Sun, 14 Jan 2001 19:01:31 +0100
4662
4663openssh (1:2.3.0p1-1.6) unstable; urgency=high
4664
4665 * Added Build-Dependency on groff (Closes: #81886)
4666 * Added Build-Depencency on debhelper (Closes: #82072)
4667 * Fixed entry for known_hosts in sshd_config (Closes: #82096)
4668
4669 -- Christian Kurz <shorty@debian.org> Thu, 11 Jan 2001 23:08:16 +0100
4670
4671openssh (1:2.3.0p1-1.5) unstable; urgency=high
4672
4673 * Fixed now also the problem with sshd used as default ipv4 and
4674 didn't use IPv6. This should be now fixed.
4675
4676 -- Christian Kurz <shorty@debian.org> Thu, 11 Jan 2001 21:25:55 +0100
4677
4678openssh (1:2.3.0p1-1.4) unstable; urgency=high
4679
4680 * Fixed buggy entry in postinst.
4681
4682 -- Christian Kurz <shorty@debian.org> Wed, 10 Jan 2001 23:12:16 +0100
4683
4684openssh (1:2.3.0p1-1.3) unstable; urgency=high
4685
4686 * After finishing the rewrite of the rules-file I had to notice that
4687 the manpage installation was broken. This should now work again.
4688
4689 -- Christian Kurz <shorty@debian.org> Wed, 10 Jan 2001 22:11:59 +0100
4690
4691openssh (1:2.3.0p1-1.2) unstable; urgency=high
4692
4693 * Fixed the screwed up build-dependency.
4694 * Removed --with-ipv4-default to support ipv6.
4695 * Changed makefile to use /etc/pam.d/ssh instead of /etc/pam.d/sshd.
4696 * Fixed location to sftp-server in config.
4697 * Since debian still relies on /etc/pam.d/ssh instead of moving to
4698 /etc/pam.d/sshd, I had to hack ssh.h to get ssh to use this name.
4699 * Fixed path to host key in sshd_config.
4700
4701 -- Christian Kurz <shorty@debian.org> Wed, 10 Jan 2001 08:23:47 +0100
4702
4703openssh (1:2.3.0p1-1.1) unstable; urgency=medium
4704
4705 * NMU with permission of Phil Hands.
4706 * New upstream release
4707 * Update Build-Depends to point to new libssl096.
4708 * This upstream release doesn't leak any information depending
4709 on the setting of PermitRootLogin (Closes: #59933)
4710 * New upstream release contains fix against forcing a client to
4711 do X/agent forwarding (Closes: #76788)
4712 * Changed template to contain correct path to the documentation
4713 (Closes: #67245)
4714 * Added --with-4in6 switch as compile option into debian/rules.
4715 * Added --with-ipv4-default as compile option into debian/rules.
4716 (Closes: #75037)
4717 * Changed default path to also contain /usr/local/bin and
4718 /usr/X11R6/bin (Closes: #62472,#54567,#62810)
4719 * Changed path to sftp-server in sshd_config to match the
4720 our package (Closes: #68347)
4721 * Replaced OpenBSDh with OpenBSD in the init-script.
4722 * Changed location to original source in copyright.head
4723 * Changed behaviour of init-script when invoked with the option
4724 restart (Closes: #68706,#72560)
4725 * Added a note about -L option of scp to README.Debian
4726 * ssh won't print now the motd if invoked with -t option
4727 (Closes: #59933)
4728 * RFC.nroff.gz get's now converted into RFC.gz. (Closes: #63867)
4729 * Added a note about tcp-wrapper support to README.Debian
4730 (Closes: #72807,#22190)
4731 * Removed two unneeded options from building process.
4732 * Added sshd.pam into debian dir and install it.
4733 * Commented out unnecessary call to dh_installinfo.
4734 * Added a line to sshd.pam so that limits will be paid attention
4735 to (Closes: #66904)
4736 * Restart Option has a Timeout of 10 seconds (Closes: 51264)
4737 * scp won't override files anymore (Closes: 51955)
4738 * Removed pam_lastlog module, so that the lastlog is now printed
4739 only once (Closes: #71742, #68335, #69592, #71495, #77781)
4740 * If password is expired, openssh now forces the user to change it.
4741 (Closes: #51747)
4742 * scp should now have no more problems with shell-init-files that
4743 produces ouput (Closes: #56280,#59873)
4744 * ssh now prints the motd correctly (Closes: #66926)
4745 * ssh upgrade should disable ssh daemon only if users has choosen
4746 to do so (Closes: #67478)
4747 * ssh can now be installed suid (Closes: #70879)
4748 * Modified debian/rules to support hurd.
4749
4750 -- Christian Kurz <shorty@debian.org> Wed, 27 Dec 2000 20:06:57 +0100
4751
4752openssh (1:2.2.0p1-1.1) unstable; urgency=medium
4753
4754 * Non-Maintainer Upload
4755 * Check for new returns in the new libc
4756 (closes: #72803, #74393, #72797, #71307, #71702)
4757 * Link against libssl095a (closes: #66304)
4758 * Correct check for PermitRootLogin (closes: #69448)
4759
4760 -- Ryan Murray <rmurray@debian.org> Wed, 18 Oct 2000 00:48:18 -0700
4761
4762openssh (1:2.2.0p1-1) unstable; urgency=low
4763
4764 * New upstream release
4765
4766 -- Philip Hands <phil@hands.com> Mon, 11 Sep 2000 14:49:43 +0100
4767
4768openssh (1:2.1.1p4-3) unstable; urgency=low
4769
4770 * add rsh alternatives
4771 * add -S option to scp (using Tommi Virtanen's patch) (closes: #63097)
4772 * do the IPV4_DEFAULT thing properly this time
4773
4774 -- Philip Hands <phil@hands.com> Fri, 11 Aug 2000 18:14:37 +0100
4775
4776openssh (1:2.1.1p4-2) unstable; urgency=low
4777
4778 * reinstate manpage .out patch from 1:1.2.3
4779 * fix typo in postinst
4780 * only compile ssh with IPV4_DEFAULT
4781 * apply James Troup's patch to add a -o option to scp and updated manpage
4782
4783 -- Philip Hands <phil@hands.com> Sun, 30 Jul 2000 00:12:49 +0100
4784
4785openssh (1:2.1.1p4-1) unstable; urgency=low
4786
4787 * New upstream release
4788
4789 -- Philip Hands <phil@hands.com> Sat, 29 Jul 2000 14:46:16 +0100
4790
4791openssh (1:1.2.3-10) unstable; urgency=low
4792
4793 * add version to libpam-modules dependency, because old versions of
4794 pam_motd make it impossible to log in.
4795
4796 -- Philip Hands <phil@hands.com> Sat, 29 Jul 2000 13:28:22 +0100
4797
4798openssh (1:1.2.3-9) frozen unstable; urgency=low
4799
4800 * force location of /usr/bin/X11/xauth
4801 (closes: #64424, #66437, #66859) *RC*
4802 * typos in config (closes: #66779, #66780)
4803 * sshd_not_to_be_run could be assumed to be true, in error, if the config
4804 script died in an unusual way --- I've reversed this (closes: #66335)
4805 * Apply Zack Weinberg <zack@wolery.cumb.org>'s patch to ssh-askpass-ptk
4806 (closes: #65981)
4807 * change default for PermitRootLogin to "no" (closes: #66406)
4808
4809 -- Philip Hands <phil@hands.com> Tue, 11 Jul 2000 20:51:18 +0100
4810
4811openssh (1:1.2.3-8) frozen unstable; urgency=low
4812
4813 * get rid of Provides: rsh-server (this will mean that rstartd
4814 will need to change it's depends to deal with #63948, which I'm
4815 reopening) (closes: #66257)
4816 Given that this is also a trivial change, and is a reversal of a
4817 change that was mistakenly made after the freeze, I think this should
4818 also go into frozen.
4819
4820 -- Philip Hands <phil@hands.com> Wed, 28 Jun 2000 03:26:30 +0100
4821
4822openssh (1:1.2.3-7) frozen unstable; urgency=low
4823
4824 * check if debconf is installed before calling db_stop in postinst.
4825 This is required to allow ssh to be installed when debconf is not
4826 wanted, which probably makes it an RC upload (hopefully the last of
4827 too many).
4828
4829 -- Philip Hands <phil@hands.com> Wed, 28 Jun 2000 03:19:47 +0100
4830
4831openssh (1:1.2.3-6) frozen unstable; urgency=low
4832
4833 * fixed depressing little bug involving a line wrap looking like
4834 a blank line in the templates file *RC*
4835 (closes: #66090, #66078, #66083, #66182)
4836
4837 -- Philip Hands <phil@hands.com> Mon, 26 Jun 2000 00:45:05 +0100
4838
4839openssh (1:1.2.3-5) frozen unstable; urgency=low
4840
4841 * add code to prevent UseLogin exploit, although I think our PAM
4842 conditional code breaks UseLogin in a way that protects us from this
4843 exploit anyway. ;-) (closes: #65495) *RC*
4844 * Apply Zack Weinberg <zack@wolery.cumb.org>'s patch to fix keyboard
4845 grab vulnerability in ssh-askpass-gnome (closes: #64795) *RC*
4846 * stop redirection of sshd's file descriptors (introduced in 1:1.2.3-3)
4847 and use db_stop in the postinst to solve that problem instead
4848 (closes: #65104)
4849 * add Provides: rsh-server to ssh (closes: #63948)
4850 * provide config option not to run sshd
4851
4852 -- Philip Hands <phil@hands.com> Mon, 12 Jun 2000 23:05:11 +0100
4853
4854openssh (1:1.2.3-4) frozen unstable; urgency=low
4855
4856 * fixes #63436 which is *RC*
4857 * add 10 second pause in init.d restart (closes: #63844)
4858 * get rid of noenv in PAM mail line (closes: #63856)
4859 * fix host key path in make-ssh-known-hosts (closes: #63713)
4860 * change wording of SUID template (closes: #62788, #63436)
4861
4862 -- Philip Hands <phil@hands.com> Sat, 27 May 2000 11:18:06 +0100
4863
4864openssh (1:1.2.3-3) frozen unstable; urgency=low
4865
4866 * redirect sshd's file descriptors to /dev/null in init to
4867 prevent debconf from locking up during installation
4868 ** grave bug just submited by me **
4869
4870 -- Philip Hands <phil@hands.com> Thu, 20 Apr 2000 17:10:59 +0100
4871
4872openssh (1:1.2.3-2) frozen unstable; urgency=low
4873
4874 * allow user to select SUID status of /usr/bin/ssh (closes: 62462) ** RC **
4875 * suggest debconf
4876 * conflict with debconf{,-tiny} (<<0.2.17) so I can clean up the preinst
4877
4878 -- Philip Hands <phil@hands.com> Wed, 19 Apr 2000 17:49:15 +0100
4879
4880openssh (1:1.2.3-1) frozen unstable; urgency=low
4881
4882 * New upstream release
4883 * patch sshd to create extra xauth key required for localhost
4884 (closes: #49944) *** RC ***
4885 * FallbacktoRsh now defaults to ``no'' to match impression
4886 given in sshd_config
4887 * stop setting suid bit on ssh (closes: #58711, #58558)
4888 This breaks Rhosts authentication (which nobody uses) and allows
4889 the LD_PRELOAD trick to get socks working, so seems like a net benefit.
4890
4891 -- Philip Hands <phil@hands.com> Thu, 13 Apr 2000 20:01:54 +0100
4892
4893openssh (1:1.2.2-1.4) frozen unstable; urgency=low
4894
4895 * Recompile for frozen, contains fix for RC bug.
4896
4897 -- Tommi Virtanen <tv@debian.org> Tue, 29 Feb 2000 22:14:58 +0200
4898
4899openssh (1:1.2.2-1.3) unstable; urgency=low
4900
4901 * Integrated man page addition for PrintLastLog.
4902 This bug was filed on "openssh", and I ended up
4903 creating my own patch for this (closes: #59054)
4904 * Improved error message when ssh_exchange_identification
4905 gets EOF (closes: #58904)
4906 * Fixed typo (your -> you're) in debian/preinst.
4907 * Added else-clauses to config to make this upgradepath possible:
4908 oldssh -> openssh preinst fails due to upgrade_to_openssh=false
4909 -> ssh-nonfree -> openssh. Without these, debconf remembered
4910 the old answer, config didn't force asking it, and preinst always
4911 aborted (closes: #56596, #57782)
4912 * Moved setting upgrade_to_openssh isdefault flag to the place
4913 where preinst would abort. This means no double question to most
4914 users, people who currently suffer from "can't upgrade" may need
4915 to run apt-get install ssh twice. Did not do the same for
4916 use_old_init_script, as the situation is a bit different, and
4917 less common (closes: #54010, #56224)
4918 * Check for existance of ssh-keygen before attempting to use it in
4919 preinst, added warning for non-existant ssh-keygen in config. This
4920 happens when the old ssh is removed (say, due to ssh-nonfree getting
4921 installed).
4922
4923 -- Tommi Virtanen <tv@debian.org> Sun, 27 Feb 2000 21:36:43 +0200
4924
4925openssh (1:1.2.2-1.2) frozen unstable; urgency=low
4926
4927 * Non-maintainer upload.
4928 * Added configuration option PrintLastLog, default off due to PAM
4929 (closes: #54007, #55042)
4930 * ssh-askpass-{gnome,ptk} now provide ssh-askpass, making ssh's
4931 Suggests: line more accurate. Also closing related bugs fixed
4932 earlier, when default ssh-askpass moved to /usr/bin.
4933 (closes: #52403, #54741, #50607, #52298, #50967, #51661)
4934 * Patched to call vhangup, with autoconf detection and all
4935 (closes: #55379)
4936 * Added --with-ipv4-default workaround to a glibc bug causing
4937 slow DNS lookups, as per UPGRADING. Use -6 to really use
4938 IPv6 addresses. (closes: #57891, #58744, #58713, #57970)
4939 * Added noenv to PAM pam_mail line. Thanks to Ben Collins.
4940 (closes: #58429)
4941 * Added the UPGRADING file to the package.
4942 * Added frozen to the changelog line and recompiled before
4943 package was installed into the archive.
4944
4945 -- Tommi Virtanen <tv@debian.org> Fri, 25 Feb 2000 22:08:57 +0200
4946
4947openssh (1:1.2.2-1.1) frozen unstable; urgency=low
4948
4949 * Non-maintainer upload.
4950 * Integrated scp pipe buffer patch from Ben Collins
4951 <benc@debian.org>, should now work even if reading
4952 a pipe gives less than fstat st_blksize bytes.
4953 Should now work on Alpha and Sparc Linux (closes: #53697, #52071)
4954 * Made ssh depend on libssl09 (>= 0.9.4-3) (closes: #51393)
4955 * Integrated patch from Ben Collins <benc@debian.org>
4956 to do full shadow account locking and expiration
4957 checking (closes: #58165, #51747)
4958
4959 -- Tommi Virtanen <tv@debian.org> Tue, 22 Feb 2000 20:46:12 +0200
4960
4961openssh (1:1.2.2-1) frozen unstable; urgency=medium
4962
4963 * New upstream release (closes: #56870, #56346)
4964 * built against new libesd (closes: #56805)
4965 * add Colin Watson <cjw44@cam.ac.uk> =NULL patch
4966 (closes: #49902, #54894)
4967 * use socketpairs as suggested by Andrew Tridgell to eliminate rsync
4968 (and other) lockups
4969 * patch SSHD_PAM_SERVICE back into auth-pam.c, again :-/
4970 (closes: #49902, #55872, #56959)
4971 * uncoment the * line in ssh_config (closes: #56444)
4972
4973 * #54894 & #49902 are release critical, so this should go in frozen
4974
4975 -- Philip Hands <phil@hands.com> Wed, 9 Feb 2000 04:52:04 +0000
4976
4977openssh (1:1.2.1pre24-1) unstable; urgency=low
4978
4979 * New upstream release
4980
4981 -- Philip Hands <phil@hands.com> Fri, 31 Dec 1999 02:47:24 +0000
4982
4983openssh (1:1.2.1pre23-1) unstable; urgency=low
4984
4985 * New upstream release
4986 * excape ? in /etc/init.d/ssh (closes: #53269)
4987
4988 -- Philip Hands <phil@hands.com> Wed, 29 Dec 1999 16:50:46 +0000
4989
4990openssh (1:1.2pre17-1) unstable; urgency=low
4991
4992 * New upstream release
4993
4994 -- Philip Hands <phil@hands.com> Thu, 9 Dec 1999 16:50:40 +0000
4995
4996openssh (1:1.2pre16-1) unstable; urgency=low
4997
4998 * New upstream release
4999 * upstream release (1.2pre14) (closes: #50299)
5000 * make ssh depend on libwrap0 (>= 7.6-1.1) (closes: #50973, #50776)
5001 * dispose of grep -q broken pipe message in config script (closes: #50855)
5002 * add make-ssh-known-hosts (closes: #50660)
5003 * add -i option to ssh-copy-id (closes: #50657)
5004 * add check for *LK* in password, indicating a locked account
5005
5006 -- Philip Hands <phil@hands.com> Wed, 8 Dec 1999 22:59:38 +0000
5007
5008openssh (1:1.2pre13-1) unstable; urgency=low
5009
5010 * New upstream release
5011 * make sshd.c use SSHD_PAM_SERVICE and define it as "ssh" in debian/rules
5012 * remove duplicate line in /etc/pam.d/ssh (closes: #50310)
5013 * mention ssh -A option in ssh.1 & ssh_config
5014 * enable forwarding to localhost in default ssh_config (closes: #50373)
5015 * tweak preinst to deal with debconf being `unpacked'
5016 * use --with-tcp-wrappers (closes: #49545)
5017
5018 -- Philip Hands <phil@hands.com> Sat, 20 Nov 1999 14:20:04 +0000
5019
5020openssh (1:1.2pre11-2) unstable; urgency=low
5021
5022 * oops, just realised that I forgot to strip out the unpleasant
5023 fiddling mentioned below (which turned not to be a fix anyway)
5024
5025 -- Philip Hands <phil@hands.com> Mon, 15 Nov 1999 01:35:23 +0000
5026
5027openssh (1:1.2pre11-1) unstable; urgency=low
5028
5029 * New upstream release (closes: #49722)
5030 * add 2>/dev/null to dispose of spurious message casused by grep -q
5031 (closes: #49876, #49604)
5032 * fix typo in debian/control (closes: #49841)
5033 * Do some unpleasant fiddling with upgraded keys in the preinst, which
5034 should make the keylength problem go away. (closes: #49676)
5035 * make pam_start in sshd use ``ssh'' as the service name (closes: #49956)
5036 * If /etc/ssh/NOSERVER exist, stop sshd from starting (closes: #47107)
5037 * apply Ben Collins <bcollins@debian.org>'s shadow patch
5038 * disable lastlogin and motd printing if using pam (closes: #49957)
5039 * add ssh-copy-id script and manpage
5040
5041 -- Philip Hands <phil@hands.com> Fri, 12 Nov 1999 01:03:38 +0000
5042
5043openssh (1:1.2pre9-1) unstable; urgency=low
5044
5045 * New upstream release
5046 * apply Chip Salzenberg <chip@valinux.com>'s SO_REUSEADDR patch
5047 to channels.c, to make forwarded ports instantly reusable
5048 * replace Pre-Depend: debconf with some check code in preinst
5049 * make the ssh-add ssh-askpass failure message more helpful
5050 * fix the ssh-agent getopts bug (closes: #49426)
5051 * fixed typo on Suggests: line (closes: #49704, #49571)
5052 * tidy up ssh package description (closes: #49642)
5053 * make ssh suid (closes: #49635)
5054 * in preinst upgrade code, ensure ssh_host_keys is mode 600 (closes: #49606)
5055 * disable agent forwarding by default, for the similar reasons as
5056 X forwarding (closes: #49586)
5057
5058 -- Philip Hands <phil@hands.com> Tue, 9 Nov 1999 09:57:47 +0000
5059
5060openssh (1:1.2pre7-4) unstable; urgency=low
5061
5062 * predepend on debconf (>= 0.2.17) should now allow preinst questions
5063
5064 -- Philip Hands <phil@hands.com> Sat, 6 Nov 1999 10:31:06 +0000
5065
5066openssh (1:1.2pre7-3) unstable; urgency=low
5067
5068 * add ssh-askpass package using Tommi Virtanen's perl-tk script
5069 * add ssh-preconfig package cludge
5070 * add usage hints to ssh-agent.1
5071
5072 -- Philip Hands <phil@hands.com> Fri, 5 Nov 1999 00:38:33 +0000
5073
5074openssh (1:1.2pre7-2) unstable; urgency=low
5075
5076 * use pam patch from Ben Collins <bcollins@debian.org>
5077 * add slogin symlink to Makefile.in
5078 * change /usr/bin/login to LOGIN_PROGRAM define of /bin/login
5079 * sort out debconf usage
5080 * patch from Tommi Virtanen <tv@debian.org>'s makes ssh-add use ssh-askpass
5081
5082 -- Philip Hands <phil@hands.com> Thu, 4 Nov 1999 11:08:54 +0000
5083
5084openssh (1:1.2pre7-1) unstable; urgency=low
5085
5086 * New upstream release
5087
5088 -- Philip Hands <phil@hands.com> Tue, 2 Nov 1999 21:02:37 +0000
5089
5090openssh (1:1.2.0.pre6db1-2) unstable; urgency=low
5091
5092 * change the binary package name to ssh (the non-free branch of ssh has
5093 been renamed to ssh-nonfree)
5094 * make pam file comply with Debian standards
5095 * use an epoch to make sure openssh supercedes ssh-nonfree
5096
5097 -- Philip Hands <phil@hands.com> Sat, 30 Oct 1999 16:26:05 +0100
5098
5099openssh (1.2pre6db1-1) unstable; urgency=low
5100
5101 * New upstream source
5102 * sshd accepts logins now!
5103
5104 -- Dan Brosemer <odin@linuxfreak.com> Fri, 29 Oct 1999 11:13:38 -0500
5105
5106openssh (1.2.0.19991028-1) unstable; urgency=low
5107
5108 * New upstream source
5109 * Added test for -lnsl to configure script
5110
5111 -- Dan Brosemer <odin@linuxfreak.com> Thu, 28 Oct 1999 18:52:09 -0500
5112
5113openssh (1.2.0.19991027-3) unstable; urgency=low
5114
5115 * Initial release
5116
5117 -- Dan Brosemer <odin@linuxfreak.com> Wed, 27 Oct 1999 19:39:46 -0500
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 000000000..fcd68b77e
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,2 @@
1config.log
2debian/openssh-server.sshd.pam
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000000000..ec635144f
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000000000..4452e62b0
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,214 @@
1Source: openssh
2Section: net
3Priority: standard
4Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org>
5Build-Depends: autotools-dev,
6 debhelper (>= 9.20160709~),
7 dh-autoreconf,
8 dh-exec,
9 dpkg-dev (>= 1.16.1~),
10 libaudit-dev [linux-any],
11 libedit-dev,
12 libgtk-3-dev <!pkg.openssh.nognome>,
13 libkrb5-dev | heimdal-dev,
14 libpam0g-dev | libpam-dev,
15 libselinux1-dev [linux-any],
16 libssl1.0-dev | libssl-dev (<< 1.1.0~),
17 libsystemd-dev [linux-any],
18 libwrap0-dev | libwrap-dev,
19 pkg-config,
20 zlib1g-dev (>= 1:1.2.3),
21Standards-Version: 4.1.0
22Uploaders: Colin Watson <cjwatson@debian.org>,
23 Matthew Vernon <matthew@debian.org>,
24Homepage: http://www.openssh.com/
25Vcs-Git: https://salsa.debian.org/ssh-team/openssh
26Vcs-Browser: https://salsa.debian.org/ssh-team/openssh
27
28Package: openssh-client
29Architecture: any
30Depends: adduser (>= 3.10),
31 dpkg (>= 1.7.0),
32 passwd,
33 ${misc:Depends},
34 ${shlibs:Depends},
35Recommends: xauth,
36Conflicts: sftp,
37Replaces: ssh,
38 ssh-krb5,
39Suggests: keychain,
40 libpam-ssh,
41 monkeysphere,
42 ssh-askpass,
43Provides: rsh-client,
44 ssh-client,
45Multi-Arch: foreign
46Description: secure shell (SSH) client, for secure access to remote machines
47 This is the portable version of OpenSSH, a free implementation of
48 the Secure Shell protocol as specified by the IETF secsh working
49 group.
50 .
51 Ssh (Secure Shell) is a program for logging into a remote machine
52 and for executing commands on a remote machine.
53 It provides secure encrypted communications between two untrusted
54 hosts over an insecure network. X11 connections and arbitrary TCP/IP
55 ports can also be forwarded over the secure channel.
56 It can be used to provide applications with a secure communication
57 channel.
58 .
59 This package provides the ssh, scp and sftp clients, the ssh-agent
60 and ssh-add programs to make public key authentication more convenient,
61 and the ssh-keygen, ssh-keyscan, ssh-copy-id and ssh-argv0 utilities.
62 .
63 In some countries it may be illegal to use any encryption at all
64 without a special permit.
65 .
66 ssh replaces the insecure rsh, rcp and rlogin programs, which are
67 obsolete for most purposes.
68
69Package: openssh-server
70Priority: optional
71Architecture: any
72Pre-Depends: ${misc:Pre-Depends},
73Depends: adduser (>= 3.9),
74 dpkg (>= 1.9.0),
75 libpam-modules (>= 0.72-9),
76 libpam-runtime (>= 0.76-14),
77 lsb-base (>= 4.1+Debian3),
78 openssh-client (= ${binary:Version}),
79 openssh-sftp-server,
80 procps,
81 ucf (>= 0.28),
82 ${misc:Depends},
83 ${shlibs:Depends},
84Recommends: libpam-systemd,
85 ncurses-term,
86 xauth,
87 ${openssh-server:Recommends},
88Conflicts: sftp,
89 ssh-socks,
90 ssh2,
91Replaces: ssh,
92 ssh-krb5,
93Suggests: molly-guard,
94 monkeysphere,
95 rssh,
96 ssh-askpass,
97 ufw,
98Provides: ssh-server,
99Multi-Arch: foreign
100Description: secure shell (SSH) server, for secure access from remote machines
101 This is the portable version of OpenSSH, a free implementation of
102 the Secure Shell protocol as specified by the IETF secsh working
103 group.
104 .
105 Ssh (Secure Shell) is a program for logging into a remote machine
106 and for executing commands on a remote machine.
107 It provides secure encrypted communications between two untrusted
108 hosts over an insecure network. X11 connections and arbitrary TCP/IP
109 ports can also be forwarded over the secure channel.
110 It can be used to provide applications with a secure communication
111 channel.
112 .
113 This package provides the sshd server.
114 .
115 In some countries it may be illegal to use any encryption at all
116 without a special permit.
117 .
118 sshd replaces the insecure rshd program, which is obsolete for most
119 purposes.
120
121Package: openssh-sftp-server
122Priority: optional
123Architecture: any
124Depends: ${misc:Depends},
125 ${shlibs:Depends},
126Recommends: openssh-server | ssh-server,
127Breaks: openssh-server (<< 1:6.5p1-5),
128Replaces: openssh-server (<< 1:6.5p1-5),
129Enhances: openssh-server,
130 ssh-server,
131Description: secure shell (SSH) sftp server module, for SFTP access from remote machines
132 This is the portable version of OpenSSH, a free implementation of
133 the Secure Shell protocol as specified by the IETF secsh working
134 group.
135 .
136 Ssh (Secure Shell) is a program for logging into a remote machine
137 and for executing commands on a remote machine.
138 It provides secure encrypted communications between two untrusted
139 hosts over an insecure network. X11 connections and arbitrary TCP/IP
140 ports can also be forwarded over the secure channel.
141 It can be used to provide applications with a secure communication
142 channel.
143 .
144 This package provides the SFTP server module for the SSH server. It
145 is needed if you want to access your SSH server with SFTP. The SFTP
146 server module also works with other SSH daemons like dropbear.
147 .
148 OpenSSH's sftp and sftp-server implement revision 3 of the SSH filexfer
149 protocol described in:
150 .
151 http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt
152 .
153 Newer versions of the draft will not be supported, though some features
154 are individually implemented as extensions.
155
156Package: ssh
157Priority: optional
158Architecture: all
159Pre-Depends: dpkg (>= 1.17.5),
160Depends: openssh-client (>= ${binary:Version}),
161 openssh-server (>= ${binary:Version}),
162 ${misc:Depends},
163Description: secure shell client and server (metapackage)
164 This metapackage is a convenient way to install both the OpenSSH client
165 and the OpenSSH server. It provides nothing in and of itself, so you
166 may remove it if nothing depends on it.
167
168Package: ssh-askpass-gnome
169Build-Profiles: <!pkg.openssh.nognome>
170Section: gnome
171Priority: optional
172Architecture: any
173Depends: openssh-client | ssh (>= 1:1.2pre7-4),
174 ${misc:Depends},
175 ${shlibs:Depends},
176Replaces: ssh (<< 1:3.5p1-3),
177Provides: ssh-askpass,
178Description: interactive X program to prompt users for a passphrase for ssh-add
179 This has been split out of the main openssh-client package so that
180 openssh-client does not need to depend on GTK+.
181 .
182 You probably want the ssh-askpass package instead, but this is
183 provided to add to your choice and/or confusion.
184
185Package: openssh-client-udeb
186Build-Profiles: <!noudeb>
187Package-Type: udeb
188Section: debian-installer
189Priority: optional
190Architecture: any
191Depends: ${shlibs:Depends},
192XB-Installer-Menu-Item: 99999
193Description: secure shell client for the Debian installer
194 This is the portable version of OpenSSH, a free implementation of
195 the Secure Shell protocol as specified by the IETF secsh working
196 group.
197 .
198 This package provides the ssh client for use in debian-installer.
199
200Package: openssh-server-udeb
201Build-Profiles: <!noudeb>
202Package-Type: udeb
203Section: debian-installer
204Priority: optional
205Architecture: any
206Depends: ${shlibs:Depends},
207Description: secure shell server for the Debian installer
208 This is the portable version of OpenSSH, a free implementation of
209 the Secure Shell protocol as specified by the IETF secsh working
210 group.
211 .
212 This package provides the sshd server for use in debian-installer.
213 Since it is expected to be used in specialized situations (e.g. S/390
214 installs with no console), it does not provide any configuration.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000000000..ef1bc8e69
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,247 @@
1Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2Upstream-Name: OpenSSH
3Upstream-Contact: openssh-unix-dev@mindrot.org
4Source: http://www.openssh.com/portable.html
5Comment:
6 The overall licence of the OpenSSH upstream code amounts to BSD-3-clause or
7 various less restrictive licences, with the additional restrictions that
8 derived versions must be clearly marked as such and that if derived works
9 are incompatible with the RFC-specified protocol then they must be called
10 by a name other than "ssh" or "Secure Shell".
11
12Files: *
13Copyright:
14 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
15 Markus Friedl
16 Theo de Raadt
17 Niels Provos
18 Dug Song
19 Aaron Campbell
20 Damien Miller
21 Kevin Steves
22 Daniel Kouril
23 Wesley Griffin
24 Per Allansson
25 Nils Nordman
26 Simon Wilkinson
27 Ben Lindstrom
28 Tim Rice
29 Andre Lucas
30 Chris Adams
31 Corinna Vinschen
32 Cray Inc.
33 Denis Parker
34 Gert Doering
35 Jakob Schlyter
36 Jason Downs
37 Juha Yrjölä
38 Michael Stone
39 Networks Associates Technology, Inc.
40 Solar Designer
41 Todd C. Miller
42 Wayne Schroeder
43 William Jones
44 Darren Tucker
45 Sun Microsystems
46 The SCO Group
47 Daniel Walsh
48 Red Hat, Inc
49 Simon Vallet / Genoscope
50 Internet Software Consortium
51 Reyk Floeter
52 Chad Mynhier
53License: OpenSSH
54 Tatu Ylonen's original licence is as follows (excluding some terms about
55 third-party code which are no longer relevant; see the LICENCE file for
56 details):
57 .
58 As far as I am concerned, the code I have written for this software
59 can be used freely for any purpose. Any derived versions of this
60 software must be clearly marked as such, and if the derived work is
61 incompatible with the protocol description in the RFC file, it must be
62 called by a name other than "ssh" or "Secure Shell".
63 .
64 Note that any information and cryptographic algorithms used in this
65 software are publicly available on the Internet and at any major
66 bookstore, scientific library, and patent office worldwide. More
67 information can be found e.g. at "http://www.cs.hut.fi/crypto".
68 .
69 The legal status of this program is some combination of all these
70 permissions and restrictions. Use only at your own responsibility.
71 You will be responsible for any legal consequences yourself; I am not
72 making any claims whether possessing or using this is legal or not in
73 your country, and I am not taking any responsibility on your behalf.
74 .
75 Most remaining components of the software are provided under a standard
76 2-term BSD licence:
77 .
78 Redistribution and use in source and binary forms, with or without
79 modification, are permitted provided that the following conditions
80 are met:
81 1. Redistributions of source code must retain the above copyright
82 notice, this list of conditions and the following disclaimer.
83 2. Redistributions in binary form must reproduce the above copyright
84 notice, this list of conditions and the following disclaimer in the
85 documentation and/or other materials provided with the distribution.
86 .
87 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
88 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
89 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
90 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
91 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
92 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
93 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
94 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
95 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
96 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
97 .
98 Some code is licensed under an ISC-style license, to the following
99 copyright holders:
100 .
101 Permission to use, copy, modify, and distribute this software for any
102 purpose with or without fee is hereby granted, provided that the above
103 copyright notice and this permission notice appear in all copies.
104 .
105 THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
106 WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
107 OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
108 FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
109 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
110 OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
111 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
112
113Files: ssh-keyscan.*
114Copyright: 1995, 1996 David Mazieres <dm@lcs.mit.edu>
115License: Mazieres-BSD-style
116 Modification and redistribution in source and binary forms is
117 permitted provided that due credit is given to the author and the
118 OpenBSD project by leaving this copyright notice intact.
119
120Files: rijndael.*
121License: public-domain
122 This code is from a reference implementation of the Rijndael cipher which
123 has been dedicated to the public domain.
124 .
125 @version 3.0 (December 2000)
126 .
127 Optimised ANSI C code for the Rijndael cipher (now AES)
128 .
129 @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
130 @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
131 @author Paulo Barreto <paulo.barreto@terra.com.br>
132 .
133 This code is hereby placed in the public domain.
134 .
135 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
136 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
137 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
138 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
139 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
140 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
141 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
142 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
143 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
144 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
145 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146
147Files: loginrec.c openbsd-compat/* scp.c
148Copyright:
149 1983, 1995-1997 Eric P. Allman
150 1999 Aaron Campbell
151 1993 by Digital Equipment Corporation
152 2000 Andre Lucas
153 1999-2010 Damien Miller
154 1997-2010 Todd C. Miller
155 1995, 1996, 1998, 1999, 2008 Theo de Raadt
156 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
157 1980, 1983, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995 The Regents of the University of California
158License: BSD-3-clause
159 Redistribution and use in source and binary forms, with or without
160 modification, are permitted provided that the following conditions
161 are met:
162 1. Redistributions of source code must retain the above copyright
163 notice, this list of conditions and the following disclaimer.
164 2. Redistributions in binary form must reproduce the above copyright
165 notice, this list of conditions and the following disclaimer in the
166 documentation and/or other materials provided with the distribution.
167 3. Neither the name of the University nor the names of its contributors
168 may be used to endorse or promote products derived from this software
169 without specific prior written permission.
170 .
171 THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
172 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
173 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
174 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
175 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
176 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
177 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
178 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
179 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
180 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
181 SUCH DAMAGE.
182
183Files: md5crypt.*
184Copyright: Poul-Henning Kamp
185License: Beer-ware
186 "THE BEER-WARE LICENSE" (Revision 42):
187 <phk@login.dknet.dk> wrote this file. As long as you retain this
188 notice you can do whatever you want with this stuff. If we meet
189 some day, and you think this stuff is worth it, you can buy me a
190 beer in return. Poul-Henning Kamp
191
192Files: openbsd-compat/bsd-snprintf.c
193Copyright: 1995 Patrick Powell
194License: Powell-BSD-style
195 This code is based on code written by Patrick Powell
196 (papowell@astart.com) It may be used for any purpose as long as this
197 notice remains intact on all source code distributions
198
199Files: openbsd-compat/sigact.*
200Copyright: 1998, 2000 Free Software Foundation, Inc.
201License: Expat-with-advertising-restriction
202 Permission is hereby granted, free of charge, to any person obtaining a
203 copy of this software and associated documentation files (the
204 "Software"), to deal in the Software without restriction, including
205 without limitation the rights to use, copy, modify, merge, publish,
206 distribute, distribute with modifications, sublicense, and/or sell
207 copies of the Software, and to permit persons to whom the Software is
208 furnished to do so, subject to the following conditions:
209 .
210 The above copyright notice and this permission notice shall be included
211 in all copies or substantial portions of the Software.
212 .
213 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
214 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
215 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
216 IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
217 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
218 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
219 THE USE OR OTHER DEALINGS IN THE SOFTWARE.
220 .
221 Except as contained in this notice, the name(s) of the above copyright
222 holders shall not be used in advertising or otherwise to promote the
223 sale, use or other dealings in this Software without prior written
224 authorization.
225
226Files: debian/*
227Copyright: Matthew Vernon, Colin Watson
228License: BSD-2-clause
229 Redistribution and use in source and binary forms, with or without
230 modification, are permitted provided that the following conditions
231 are met:
232 1. Redistributions of source code must retain the above copyright
233 notice, this list of conditions and the following disclaimer.
234 2. Redistributions in binary form must reproduce the above copyright
235 notice, this list of conditions and the following disclaimer in the
236 documentation and/or other materials provided with the distribution.
237 .
238 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
239 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
240 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
242 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
243 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
244 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
245 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
246 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
247 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/faq.html b/debian/faq.html
new file mode 100644
index 000000000..7f0252891
--- /dev/null
+++ b/debian/faq.html
@@ -0,0 +1,1187 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<title>OpenSSH FAQ</title>
5<link rev= "made" href= "mailto:www@openbsd.org">
6<meta name= "resource-type" content= "document">
7<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
8<meta name= "description" content= "the OpenSSH FAQ page">
9<meta name= "keywords" content= "OpenSSH,SSH,Secure Shell,faq">
10<meta name= "distribution" content= "global">
11<meta name= "copyright" content= "This document copyright 1999-2010 OpenBSD.">
12</head>
13
14<body bgcolor= "#ffffff" text= "#000000" link= "#23238E">
15<a href="http://www.openssh.com/index.html"><img alt="[OpenSSH]" height="30" width="141" src="images/smalltitle.gif" border="0"></a>
16<p>
17
18<h1>OpenSSH FAQ (Frequently asked questions)</h1>
19
20<hr>
21
22<blockquote>
23<h3><a href= "#1.0">1.0 - What Is OpenSSH and Where Can I Get It?</a></h3>
24<ul>
25<li><a href= "#1.1">1.1 - What is OpenSSH and where can I download it?</a>
26<li><a href= "#1.2">1.2 - Why should it be used?</a>
27<li><a href= "#1.3">1.3 - What Operating Systems are supported?</a>
28<li><a href= "#1.4">1.4 - What about copyright, usage and patents?</a>
29<li><a href= "#1.5">1.5 - Where should I ask for help?</a>
30<li><a href= "#1.6">1.6 - I have found a bug. Where do I report it?</a>
31</ul>
32
33<h3><a href= "#2.0">2.0 - General Questions</a></h3>
34<ul>
35<li><a href= "#2.1">2.1 - Why does ssh/scp make connections from low-numbered ports. My firewall blocks these.</a>
36<li><a href= "#2.2">2.2 - Why is the ssh client setuid root?</a>
37<li><a href= "#2.3">2.3 - Why does SSH 2.3 have problems interoperating with OpenSSH 2.1.1?</a>
38<li><a href= "#2.4">2.4 - Why does OpenSSH print: Dispatch protocol error: type 20</a>
39<li><a href= "#2.5">2.5 - Old versions of commercial SSH encrypt host keys with IDEA.</a>
40<li><a href= "#2.6">2.6 - What are these warning messages about key lengths?</a>
41<li><a href= "#2.7">2.7 - X11 and/or agent forwarding does not work.</a>
42<li><a href= "#2.8">2.8 - After upgrading OpenSSH I lost SSH2 support.</a>
43<li><a href= "#2.9">2.9 - sftp/scp fails at connection, but ssh is OK.</a>
44<li><a href= "#2.10">2.10 - Will you add [foo] to scp?</a>
45<li><a href= "#2.11">2.11 - How do I use port forwarding?</a>
46<li><a href= "#2.12">2.12 - My ssh connection freezes or drops out after N minutes of inactivity.</a>
47<li><a href= "#2.13">2.13 - How do I use scp to copy a file with a colon in it?</a>
48<li><a href= "#2.14">2.14 - Why does OpenSSH report its version to clients?</a>
49</ul>
50
51<h3><a href= "#3.0">3.0 - Portable OpenSSH Questions</a></h3>
52<ul>
53<li><a href= "#3.1">3.1 - Spurious PAM authentication messages in logfiles.</a>
54<li><a href= "#3.2">3.2 - Empty passwords not allowed with PAM authentication.</a>
55<li><a href= "#3.3">3.3 - ssh(1) takes a long time to connect or log in</a>
56<li><a href= "#3.4">3.4 - "Can't locate module net-pf-10" messages in log under Linux.</a>
57<li><a href= "#3.5">3.5 - Password authentication doesn't work (eg on Slackware 7.0 or Red Hat Linux 6.x)</a>
58<li><a href= "#3.6">3.6 - Configure or sshd(8) complain about lack of RSA support</a>
59<li><a href= "#3.7">3.7 - "scp: command not found" errors</a>
60<li><a href= "#3.8">3.8 - Unable to read passphrase</a>
61<li><a href= "#3.9">3.9 - 'configure' missing or make fails</a>
62<li><a href= "#3.10">3.10 - Hangs when exiting ssh</a>
63<li><a href= "#3.11">3.11 - Why does ssh hang on exit?</a>
64<li><a href= "#3.12">3.12 - I upgraded to OpenSSH 3.1 and X11 forwarding stopped working.</a>
65<li><a href= "#3.13">3.13 - I upgraded to OpenSSH 3.8 and some X11 programs stopped working.</a>
66<li><a href= "#3.14">3.14 - I copied my public key to authorized_keys but public-key authentication still doesn't work.</a>
67<li><a href= "#3.15">3.15 - OpenSSH versions and PAM behaviour.</a>
68<li><a href= "#3.16">3.16 - Why doesn't "w" or "who" on AIX 5.x show users logged in via ssh?</a>
69</ul>
70
71</blockquote>
72
73<hr>
74
75<h2><u><a name= "1.0">1.0 - What Is OpenSSH and Where Can I Get It?</a></u></h2>
76
77<h2><a name= "1.1">1.1 - What is OpenSSH and where can I download it?</a></h2>
78
79OpenSSH provides end-to-end encrypted replacement of applications such as
80telnet, rlogin, and ftp.
81Unlike these legacy applications, OpenSSH never passes anything
82(including username and password) over the wire in unencrypted form, and
83provides host authentication, to verify that you really are talking to
84the system that you think you are and that no one else can take over
85that session.
86
87<p>
88The OpenSSH suite includes the
89<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&amp;sektion=1">ssh(1)</a>
90program which replaces rlogin and telnet, and
91<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=scp&amp;sektion=1">scp(1)</a>
92which replaces
93<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=rcp&amp;sektion=1">rcp(1)</a> and
94<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ftp&amp;sektion=1">ftp(1)</a>.
95OpenSSH has also added
96<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sftp&amp;sektion=1">sftp(1)</a> and
97<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sftp-server&amp;sektion=8">sftp-server(8)</a>
98which implement an easier solution for file-transfer. This is based upon the
99<a href="http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt">secsh-filexfer</a> IETF draft.
100
101
102<p><strong>OpenSSH consists of a number of programs.</strong>
103
104<ul>
105<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd&amp;sektion=8">sshd(8)</a> - Server program run on the server machine. This listens for connections from client machines, and whenever it receives a connection, it performs authentication and starts serving the client.
106Its behaviour is controlled by the config file <i><a
107href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&amp;sektion=5">
108sshd_config(5)</a></i>.
109<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&amp;sektion=1">ssh(1)</a> - This is the client program used to log into another machine or to execute commands on the other machine. <i>slogin</i> is another name for this program.
110Its behaviour is controlled by the global config file <i><a
111href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&amp;sektion=5">
112ssh_config(5)</a></i> and individual users' <i>$HOME/.ssh/config</i> files.
113<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=scp&amp;sektion=1">scp(1)</a> - Securely copies files from one machine to another.
114<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&amp;sektion=1">ssh-keygen(1)</a> - Used to create Pubkey Authentication (RSA or DSA) keys (host keys and user authentication keys).
115<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-agent&amp;sektion=1">ssh-agent(1)</a> - Authentication agent. This can be used to hold RSA keys for authentication.
116<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-add&amp;sektion=1">ssh-add(1)</a> - Used to register new keys with the agent.
117<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sftp-server&amp;sektion=8">sftp-server(8)</a> - SFTP server subsystem.
118<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sftp&amp;sektion=1">sftp(1)</a> - Secure file transfer program.
119<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keyscan&amp;sektion=1">ssh-keyscan(1)</a> - gather ssh public keys.
120<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keysign&amp;sektion=8">ssh-keysign(8)</a> - ssh helper program for hostbased authentication.
121</ul>
122
123<h3>Downloading</h3>
124
125<p>
126The most recent version of OpenSSH is included with the current
127distribution of <a href="http://www.openbsd.org/">OpenBSD</a>, and
128installed as part of a basic install.
129
130<p>
131Today, most other operating systems include some version of OpenSSH
132(often re-badged or privately labeled), so most users can immediately
133use it.
134However, sometimes the included versions are quite old, and missing
135features of the current release of OpenSSH, and you may wish to install
136the current version, or install it on one of the few OSs that lacked it,
137and where the OS publisher does not make a modern version available.
138You may also wish to use OpenSSH on your embedded application.
139
140<p>
141Non-OpenBSD users will want to download, compile and install the
142multi-platform <a href="http://www.openssh.com/portable.html">Portable</a> distribution from a
143<a href="http://www.openssh.com/portable.html#mirrors">mirror</a> near you.
144
145
146<h2><a name= "1.2">1.2 - Why should it be used?</a></h2>
147
148<p>
149OpenSSH is a suite of tools to help secure your network
150connections. Here is a list of features:
151
152
153<ul>
154 <li>Strong authentication. Closes several security holes (e.g., IP, routing, and DNS spoofing).
155 <li>Improved privacy. All communications are automatically and transparently encrypted.
156 <li>Secure X11 sessions. The program automatically sets DISPLAY on the server machine, and forwards any X11 connections over the secure channel.
157 <li>Arbitrary TCP/IP ports can be redirected through the encrypted channel in both directions (e.g., for e-cash transactions).
158 <li>No retraining needed for normal users.
159 <li>Never trusts the network. Minimal trust on the remote side of the connection. Minimal trust on domain name servers. Pure RSA authentication never trusts anything but the private key.
160 <li>Client RSA-authenticates the server machine in the beginning of every connection to prevent trojan horses (by routing or DNS spoofing) and man-in-the-middle attacks, and the server RSA-authenticates the client machine before accepting <i>.rhosts</i> or <i>/etc/hosts.equiv</i> authentication (to prevent DNS, routing, or IP-spoofing).
161 <li>Host authentication key distribution can be centrally by the administration, automatically when the first connection is made to a machine.
162 <li>Any user can create any number of user authentication RSA keys for his/her own use.
163 <li>The server program has its own server RSA key which is automatically regenerated every hour.
164 <li>An authentication agent, running in the user's laptop or local workstation, can be used to hold the user's RSA authentication keys.
165 <li>The software can be installed and used (with restricted functionality) even without root privileges.
166 <li>The client is customizable in system-wide and per-user configuration files.
167 <li>Optional compression of all data with gzip (including forwarded X11 and TCP/IP port data), which may result in significant speedups on slow connections.
168 <li>Complete replacement for rlogin, rsh, and rcp.
169</ul>
170
171<p>
172Currently, almost all communications in computer networks are done
173without encryption. As a consequence, anyone who has access to any
174machine connected to the network can listen in on any communication.
175This is being done by hackers, curious administrators, employers,
176criminals, industrial spies, and governments. Some networks leak off
177enough electromagnetic radiation that data may be captured even from a
178distance.
179
180
181<p>
182When you log in, your password goes in the network in plain
183text. Thus, any listener can then use your account to do any evil he
184likes. Many incidents have been encountered worldwide where crackers
185have started programs on workstations without the owner's knowledge
186just to listen to the network and collect passwords. Programs for
187doing this are available on the Internet, or can be built by a
188competent programmer in a few hours.
189
190
191<p>
192Businesses have trade secrets, patent applications in preparation,
193pricing information, subcontractor information, client data, personnel
194data, financial information, etc. Currently, anyone with access to
195the network (any machine on the network) can listen to anything that
196goes in the network, without any regard to normal access restrictions.
197
198
199<p>
200Many companies are not aware that information can so easily be
201recovered from the network. They trust that their data is safe
202since nobody is supposed to know that there is sensitive information
203in the network, or because so much other data is transferred in the
204network. This is not a safe policy.
205
206
207<h2><a name= "1.3">1.3 - What operating systems are supported?</a></h2>
208
209<p>
210Even though OpenSSH is developed on
211<a href="http://www.openbsd.org/">OpenBSD</a> a wide variety of
212ports to other operating systems exist. The portable version of OpenSSH
213is headed by <a href="mailto:djm@openbsd.org">Damien Miller</a>.
214For a quick overview of the portable version of OpenSSH see
215<a href="http://www.openssh.com/portable.html">OpenSSH Portable Release</a>.
216Currently, the supported operating systems are:
217
218
219<ul>
220 <li>OpenBSD
221 <li>NetBSD
222 <li>FreeBSD
223 <li>AIX
224 <li>HP-UX
225 <li>IRIX
226 <li>Linux
227 <li>NeXT
228 <li>SCO
229 <li>SNI/Reliant Unix
230 <li>Solaris
231 <li>Digital Unix/Tru64/OSF
232 <li>Mac OS X
233 <li>Cygwin
234</ul>
235
236<p>
237A list of vendors that include OpenSSH in their distributions
238is located in the <a href="http://www.openssh.com/users.html">OpenSSH Users page</a>.
239
240<h2><a name= "1.4">1.4 - What about copyrights, usage and patents?</a></h2>
241<p>
242The OpenSSH developers have tried very hard to keep OpenSSH free of any
243patent or copyright problems. To do this, some options had to be
244stripped from OpenSSH. Namely support for patented algorithms.
245
246<p>
247OpenSSH does not support any patented transport algorithms. In SSH1 mode,
248only 3DES and Blowfish are available options. In SSH2 mode, only 3DES,
249Blowfish, CAST128, Arcfour and AES can be selected.
250The patented IDEA algorithm is not supported.
251
252<p>
253OpenSSH provides support for both SSH1 and SSH2 protocols.
254
255<p>
256Since the RSA patent has expired, there are no restrictions on the use
257of RSA algorithm using software, including OpenBSD.
258
259<h2><a name= "1.5">1.5 - Where should I ask for help?</a></h2>
260<p>
261There are many places to turn to for help. In addition to the main
262<a href="http://www.openssh.com/index.html">OpenSSH website</a>,
263there are many mailing lists to try. Before trying any mailing lists,
264please search through all mailing list archives to see if your question
265has already been answered. The OpenSSH Mailing List has been archived and
266put in searchable form and can be found at
267<a href="http://marc.info/?l=openssh-unix-dev&amp;r=1&amp;w=2">marc.info</a>.
268
269<p>
270For more information on subscribing to OpenSSH related mailing lists,
271please see <a href="http://www.openssh.com/list.html">OpenSSH Mailing lists</a>.
272
273<h2><a name= "1.6">1.6 - I have found a bug. Where do I report it?</a></h2>
274<p>
275Information about submitting bug reports can be found at the OpenSSH
276<a href="http://www.openssh.com/report.html">Reporting bugs</a> page.
277<p>
278If you wish to report a security bug, please contact the private developers
279list &lt;<a href="mailto:openssh@openssh.com">openssh@openssh.com</a>&gt;.
280
281<h2><u><a name= "2.0">2.0 - General Questions</a></u></h2>
282
283<h2><a name= "2.1">2.1 - Why does ssh/scp make connections from low-numbered ports.</a></h2>
284<p>
285The OpenSSH client uses low numbered ports for rhosts and rhosts-rsa
286authentication because the server needs to trust the username provided by
287the client. To get around this, you can add the below example to your
288<i>ssh_config</i> or <i>~/.ssh/config</i> file.
289
290
291<blockquote>
292<table border=0 width="800">
293 <tr>
294 <td nowrap bgcolor="#EEEEEE">
295<b>UsePrivilegedPort no</b>
296 </td>
297 </tr>
298</table>
299</blockquote>
300
301<p>
302Or you can specify this option on the command line, using the <b>-o</b>
303option to
304<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&amp;sektion=1">ssh(1)</a> command.
305
306<blockquote>
307<table border=0 width="800">
308 <tr>
309 <td nowrap bgcolor="#EEEEEE">
310$ <b>ssh -o "UsePrivilegedPort no" host.com</b>
311 </td>
312 </tr>
313</table>
314</blockquote>
315
316<h2><a name= "2.2">2.2 - Why is the ssh client setuid root?</a></h2>
317
318<p>
319In conjunction with the previous question, (<a href="#2.1">2.1</a>)
320OpenSSH needs root authority to be able to bind to low-numbered ports to
321facilitate <i>rhosts authentication</i>.
322A privileged port is also required for rhosts-rsa authentication to older
323SSH releases.
324
325<p>
326Additionally, for both <i>rhosts-rsa authentication</i> (in protocol
327version 1) and <i>hostbased authentication</i> (in protocol version 2)
328the ssh client needs to access the <i>private host key</i> in order to
329authenticate the client machine to the server.
330OpenSSH versions prior to 3.3 required the <code>ssh</code> binary to be
331setuid root to enable this, and you may safely remove it if you don't
332want to use these authentication methods.
333
334<p>
335Starting in OpenSSH 3.3, <code>ssh</code> is not setuid by default. <a
336href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keysign">ssh-keysign</a>,
337is used for access to the private hosts keys, and ssh does not use privileged
338source ports by default. If you wish to use a privileged source port, you must
339manually set the setuid bit on <code>ssh</code>.
340
341<h2><a name= "2.3">2.3 - Why does SSH 2.3 have problems interoperating with OpenSSH 2.1.1?</a></h2>
342
343<p>
344SSH 2.3 and earlier versions contain a flaw in their HMAC implementation.
345Their code was not supplying the full data block output from the digest,
346and instead always provided 128 bits. For longer digests, this caused
347SSH 2.3 to not interoperate with OpenSSH.
348
349<p>
350OpenSSH 2.2.0 detects that SSH 2.3 has this flaw. Recent versions of SSH
351will have this bug fixed. Or you can add the following to
352SSH 2.3 <i>sshd2_config</i>.
353
354
355<blockquote>
356<table border=0 width="800">
357 <tr>
358 <td nowrap bgcolor="#EEEEEE">
359<b>Mac hmac-md5</b>
360 </td>
361 </tr>
362</table>
363</blockquote>
364
365<h2><a name= "2.4">2.4 - Why does OpenSSH print: Dispatch protocol error: type 20</a></h2>
366
367<p>
368Problems in interoperation have been seen because older versions of
369OpenSSH did not support session rekeying. However the commercial SSH 2.3
370tries to negotiate this feature, and you might experience connection
371freezes or see the error message &quot;<b>Dispatch protocol error:
372type 20 </b>&quot;.
373To solve this problem, either upgrade to a recent OpenSSH release or
374disable rekeying by adding the following to your commercial SSH 2.3's
375<i>ssh2_config</i> or <i>sshd2_config</i>.
376
377
378<blockquote>
379<table border=0 width="800">
380 <tr>
381 <td nowrap bgcolor="#EEEEEE">
382<b>RekeyIntervalSeconds 0</b>
383 </td>
384 </tr>
385</table>
386</blockquote>
387
388<h2><a name= "2.5">2.5 - Old versions of commercial SSH encrypt host keys with IDEA.</a></h2>
389
390<p>
391The old versions of SSH used a patented algorithm to encrypt their
392<i>/etc/ssh/ssh_host_key</i>. This problem will manifest as
393<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd&amp;sektion=8">sshd(8)</a>
394not being able to read its host key. To solve this, use the command below
395to convert your ssh_host_key to use 3DES.
396<b>NOTE:</b> Use the
397<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&amp;sektion=1">ssh-keygen(1)</a>
398program from the Commercial SSH product, *NOT* OpenSSH for the example
399below.
400
401
402<blockquote>
403<table border=0 width="800">
404 <tr>
405 <td nowrap bgcolor="#EEEEEE">
406# <b>ssh-keygen -u -f /etc/ssh/ssh_host_key</b>
407 </td>
408 </tr>
409</table>
410</blockquote>
411
412<h2><a name= "2.6">2.6 - What are these warning messages about key lengths</a></h2>
413
414<p>
415Commercial SSH's
416<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&amp;sektion=1">ssh-keygen(1)</a>
417program contained a bug which caused it to occasionally generate Pubkey
418Authentication (RSA or DSA) keys which had their Most Significant Bit
419(MSB) unset. Such keys were advertised as being full-length, but are
420actually, half the time, smaller than advertised.
421
422<p>
423OpenSSH will print warning messages when it encounters such keys. To rid
424yourself of these message, edit your <i>known_hosts</i> files and replace the
425incorrect key length (usually "1024") with the correct key length
426(usually "1023").
427
428<h2><a name= "2.7">2.7 - X11 and/or agent forwarding does not work.</a></h2>
429
430<p>
431Check your <i>ssh_config</i> and <i>sshd_config</i>. The default
432configuration files disable authentication agent and X11 forwarding. To
433enable it, put the line below in <i>sshd_config</i>:
434
435<blockquote>
436<table border=0 width="800">
437 <tr>
438 <td nowrap bgcolor="#EEEEEE">
439<b>X11Forwarding yes</b>
440 </td>
441 </tr>
442</table>
443</blockquote>
444
445<p>
446and put the following lines in <i>ssh_config</i>:
447
448<blockquote>
449<table border=0 width="800">
450 <tr>
451 <td nowrap bgcolor="#EEEEEE">
452<b>ForwardAgent yes</b><br>
453<b>ForwardX11 yes</b>
454 </td>
455 </tr>
456</table>
457</blockquote>
458
459<p>
460X11 forwarding requires a working <a
461href="http://www.openbsd.org/cgi-bin/man.cgi?query=xauth&amp;sektion=1"
462>xauth(1)</a> binary. On OpenBSD this is in the <i>xbase</i> file
463set but will probably be different on other platforms. For OpenSSH
464Portable, xauth must be either found at configure time or specified
465via <b>XAuthLocation</b> in sshd_config(5) and ssh_config(5).
466
467<p>
468Note on agent interoperability: There are two different and
469incompatible agent forwarding mechanisms within the SSH2 protocol.
470OpenSSH has always used an extension of the original SSH1 agent
471requests, however some commercial products use a different, non-free
472agent forwarding protocol. This means that agent forwarding cannot
473be used between OpenSSH and those products.
474
475<p>
476<b>NOTE:</b> For users of Linux Mandrake 7.2, Mandrake modifies the
477<i>XAUTHORITY</i> environment variable in <i>/etc/skel/.bashrc</i>,
478and thus any bash user's home directory. This variable is set by OpenSSH
479and for either of the above options to work, you need to comment out
480the line:
481
482
483<blockquote>
484<table border=0 width="800">
485 <tr>
486 <td nowrap bgcolor="#EEEEEE">
487<b># export XAUTHORITY=$HOME/.Xauthority</b>
488 </td>
489 </tr>
490</table>
491</blockquote>
492
493<h2><a name= "2.8">2.8 - After upgrading OpenSSH I lost SSH2 support.</a></h2>
494
495<p>
496Between versions changes can be made to <i>sshd_config</i> or
497<i>ssh_config</i>. You should always check on these changes when upgrading
498versions of OpenSSH. After OpenSSH Version 2.3.0 you need to add the
499following to your <i>sshd_config</i>:
500
501
502<blockquote>
503<table border=0 width="800">
504 <tr>
505 <td nowrap bgcolor="#EEEEEE">
506<b>HostKey /etc/ssh_host_dsa_key</b><br>
507<b>HostKey /etc/ssh_host_rsa_key</b>
508 </td>
509 </tr>
510</table>
511</blockquote>
512
513<h2><a name= "2.9">2.9 - sftp/scp fails at connection, but ssh is OK.</a></h2>
514
515<p>
516sftp and/or scp may fail at connection time if you have shell
517initialization (.profile, .bashrc, .cshrc, etc) which produces output
518for non-interactive sessions. This output confuses the sftp/scp client.
519You can verify if your shell is doing this by executing:
520
521<blockquote>
522<table border=0 width="800">
523 <tr>
524 <td nowrap bgcolor="#EEEEEE">
525<b>ssh yourhost /usr/bin/true</b>
526 </td>
527 </tr>
528</table>
529</blockquote>
530
531<p>
532If the above command produces any output, then you need to modify your
533shell initialization.
534
535<h2><a name= "2.10">2.10 - Will you add [foo] to scp?</a></h2>
536
537<p>
538Short Answer: no.
539
540<p>
541Long Answer: scp is not standardized. The closest thing it has to a
542specification is "what rcp does". Since the same command is used on both ends
543of the connection, adding features or options risks breaking interoperability with other
544implementations.
545
546<p>
547New features are more likely in sftp, since the protocol is standardized
548(well, a <a href="http://www.ietf.org/html.charters/OLD/secsh-charter.html">
549draft standard</a>), extensible, and the client and server are decoupled.
550
551<h2><a name= "2.11">2.11 - How do I use port forwarding?</a></h2>
552
553<p>
554If the remote server is running sshd(8), it may be possible to
555``tunnel'' certain services via ssh. This may be desirable, for
556example, to encrypt POP or SMTP connections, even though the software
557does not directly support encrypted communications. Tunnelling uses
558port forwarding to create a connection between the client and server.
559The client software must be able to specify a non-standard port to
560connect to for this to work.
561
562<p>
563The idea is that the user connects to the remote host using ssh,
564and specifies which port on the client's machine should be used to
565forward connections to the remote server. After that it is possible
566to start the service which is to be encrypted (e.g. fetchmail, irc)
567on the client machine, specifying the same local port passed to
568ssh, and the connection will be tunnelled through ssh. By default,
569the system running the forward will only accept connections from
570itself.
571
572<p>
573The options most relevant to tunnelling are the -L and -R options,
574which allow the user to forward connections, the -D option, which
575permits dynamic port forwarding, the -g option, which permits other
576hosts to use port forwards, and the -f option, which instructs ssh
577to put itself in the background after authentication. See the <a
578href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&amp;sektion=1"
579>ssh(1)</a> man page for further details.
580
581<p>
582This is an example of tunnelling an IRC session from client machine
583``127.0.0.1'' (localhost) to remote server ``server.example.com'':
584
585<blockquote>
586<table border=0 width="800">
587 <tr>
588 <td nowrap bgcolor="#EEEEEE">
589<b>ssh -f -L 1234:server.example.com:6667 server.example.com sleep 10<br>
590irc -c '#users' -p 1234 pinky 127.0.0.1</b>
591 </td>
592 </tr>
593</table>
594</blockquote>
595
596<p>
597This tunnels a connection to IRC server server.example.com, joining
598channel ``#users'', using the nickname ``pinky''. The local port used
599in this example is 1234. It does not matter which port is used, as
600long as it's greater than 1023 (remember, only root can open sockets on
601privileged ports) and doesn't conflict with any ports already in use.
602The connection is forwarded to port 6667 on the remote server, since
603that's the standard port for IRC services.
604
605<p>
606The remote command ``sleep 10'' was specified to allow an amount
607of time (10 seconds, in the example) to start the service which is to
608be tunnelled. If no connections are made within the time specified,
609ssh will exit. If more time is required, the sleep(1) value can be
610increased appropriately or, alternatively, the example above could
611be added as a function to the user's shell. See ksh(1) and csh(1)
612for more details about user-defined functions.
613
614<p>
615ssh also has an -N option, convenient for use with port forwarding:
616if -N is specified, it is not necessary to specify a remote command
617(``sleep 10'' in the example above). However, use of this option
618causes ssh to wait around for ever (as opposed to exiting after a
619remote command has completed), and the user must take care to manually
620kill(1) the process afterwards.
621
622<h2><a name= "2.12">2.12 - My ssh connection freezes or drops out after N minutes of inactivity.</a></h2>
623
624<p>
625This is usually the result of a packet filter or NAT device
626timing out your TCP connection due to inactivity. You can enable
627<b>ClientAliveInterval</b> in the server's <i><a
628href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&amp;sektion=5">
629sshd_config</a></i>, or enable <b>ServerAliveInterval</b> in the
630client's <i><a
631href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&amp;sektion=5">
632ssh_config</a></i> (the latter is available in OpenSSH 3.8 and newer).
633
634<p>
635Enabling either option and setting the interval for less than the time
636it takes to time out your session will ensure that the connection is
637kept "fresh" in the device's connection table.
638
639<h2><a name= "2.13">2.13 - How do I use scp to copy a file with a colon in it?</a></h2>
640
641<b><a
642href="http://www.openbsd.org/cgi-bin/man.cgi?query=scp&amp;sektion=1">
643scp</a></b> will interpret the component before the colon to be a remote
644server name and attempt to connect to it. To prevent this, refer to
645the file by a relative or absolute path, eg:
646
647<blockquote>
648<table border=0 width="800">
649 <tr>
650 <td nowrap bgcolor="#EEEEEE">
651$ scp ./source:file sshserver:
652 </td>
653 </tr>
654</table>
655</blockquote>
656
657<h2><a name= "2.14">2.14 - Why does OpenSSH report its version to clients?</a></h2>
658
659<p>
660OpenSSH, like most SSH implementations, reports its name and version to clients
661when they connect, e.g.
662</p>
663
664<blockquote>
665SSH-2.0-OpenSSH_3.9
666</blockquote>
667
668<p>
669This information is used by clients and servers to enable protocol
670compatibility tweaks to work around changed, buggy or missing features in
671the implementation they are talking to. This protocol feature checking is
672still required at present because versions with incompatibilities are still
673in wide use.
674</p>
675
676<h2><u><a name= "3.0">3.0 - Portable OpenSSH Questions</a></u></h2>
677
678<h2><a name= "3.1">3.1 - Spurious PAM authentication messages in logfiles.</a></h2>
679
680<p>
681The portable version of OpenSSH will generate spurious authentication
682failures at every login, similar to:
683
684
685<blockquote>
686<table border=0 width="800">
687 <tr>
688 <td nowrap bgcolor="#EEEEEE">
689&quot;<b>authentication failure; (uid=0) -&gt; root for sshd service</b>&quot;
690 </td>
691 </tr>
692</table>
693</blockquote>
694
695<p>
696These are generated because OpenSSH first tries to determine whether a
697user needs authentication to login (e.g. empty password). Unfortunately
698PAM likes to log all authentication events, this one included.
699
700<p>
701If it annoys you too much, set &quot;<b>PermitEmptyPasswords no</b>&quot;
702in <i>sshd_config</i>. This will quiet the error message at the expense
703of disabling logins to accounts with no password set.
704This is the default if you use the supplied <i>sshd_config</i> file.
705
706<h2><a name= "3.2">3.2 - Empty passwords not allowed with PAM authentication.</a></h2>
707
708<p>
709To enable empty passwords with a version of OpenSSH built with PAM you
710must add the flag nullok to the end of the password checking module
711in the <i>/etc/pam.d/sshd</i> file. For example:
712
713<blockquote>
714<table border=0 width="800">
715 <tr>
716 <td nowrap bgcolor="#EEEEEE">
717auth required/lib/security/pam_unix.so shadow nodelay nullok
718 </td>
719 </tr>
720</table>
721</blockquote>
722
723<p>
724This must be done in addition to setting &quot;<b>PermitEmptyPasswords
725yes</b>&quot; in the <i>sshd_config</i> file.
726
727<p>
728There is one caveat when using empty passwords with PAM authentication:
729PAM will allow any password when authenticating an account with an empty
730password. This breaks the check that
731<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd&amp;sektion=8">sshd(8)</a>
732uses to determine whether an account has no password set and grant
733users access to the account regardless of the policy specified by
734<b>PermitEmptyPasswords</b>. For this reason, it is recommended that you
735do not add the <b>nullok</b> directive to your PAM configuration file
736unless you specifically wish to allow empty passwords.
737
738
739<h2><a name= "3.3">3.3 - ssh(1) takes a long time to connect or log
740in</a></h2>
741
742<p>
743Large delays (more than 10 seconds) are typically caused by a problem with
744name resolution:
745<ul>
746<li>Some versions of glibc (notably glibc 2.1 shipped with Red Hat 6.1)
747can take a long time to resolve "IPv6 or IPv4" addresses from domain
748names. This can be worked around with by specifying <b>AddressFamily
749inet</b> option in <i>ssh_config</i>.</li>
750
751<li>There may be a DNS lookup problem, either at the client or server.
752You can use the <code>nslookup</code> command to check this on both client
753and server by looking up the other end's name and IP address. In
754addition, on the server look up the name returned by the client's
755IP-name lookup. You can disable most of the server-side lookups by
756setting <b>UseDNS no</b> in <i>sshd_config</i>.</li>
757</ul>
758
759<p>
760Delays less than 10 seconds can have other causes.
761
762<ul>
763
764<li>OpenSSH releases prior to 3.8 had an <i>moduli</i> file with
765moduli that were just smaller than what sshd would look for, and
766as a result, sshd would end up using moduli significantly larger
767than requested, which resulted in a speed penalty. Replacing the
768<i>moduli</i> file will resolve this (note that in most cases this
769file will not be replaced during an upgrade and must be replaced
770manually).</li>
771
772<li>OpenSSH releases prior to 3.8 had a flaw in <code>ssh</code> that
773would cause it to request moduli larger than intended (which when
774combined with the above resulted in significant slowdowns).
775Upgrading the client to 3.8 or higher will resolve this issue.</li>
776
777<li>If either the client or server lack a kernel-based random number
778device (eg Solaris &lt; 9, AIX &lt; 5.2, HP-UX &lt; 11.11) and no
779substitute is available (eg <a href=
780"ftp://ftp.ayamura.org/pub/prngd/">prngd</a>) it's possible that
781one of the programs called by <code>ssh-rand-helper</code> to
782generate entropy is hanging. This can be investigated by running
783it in debug mode:
784
785<blockquote>
786<table border=0 width="800">
787 <tr>
788 <td nowrap bgcolor="#EEEEEE">
789/usr/local/libexec/ssh-rand-helper -vvv
790 </td>
791 </tr>
792</table>
793</blockquote>
794
795Any significant delays should be investigated and rectified, or the
796corresponding commands should be removed from <i>ssh_prng_cmds</i>.
797</li>
798
799</ul>
800
801<h3>How slow is "slow"?</h3>
802Under normal conditions, the speed of SSH logins is dependant on
803CPU speed of client and server. For comparison the following are
804typical connect times for <code>time ssh localhost true</code>
805with a 1024-bit RSA key on otherwise unloaded hosts. OpenSSH and
806OpenSSL were compiled with gcc 3.3.x.
807
808<p>
809<table>
810<tr><th>CPU</th><th>Time (SSHv1)<a href="#3.3fn1">[1]</a></th>
811 <th>Time (SSHv2)</th></tr>
812<tr><td>170MHz SPARC/sun4m</td><td>0.74 sec</td><td>1.25 sec</td></tr>
813<tr><td>236MHz HPPA/8200<a href="#3.3fn2">[2]</a></td><td>0.44 sec</td>
814 <td>0.79 sec</td></tr>
815<tr><td>375MHz PowerPC/604e</td><td>0.38 sec</td><td>0.51 sec</td></tr>
816<tr><td>933MHz VIA Ezra</td><td>0.34 sec</td><td>0.44 sec</td></tr>
817<tr><td>2.1GHz Athlon XP 2600+</td><td>0.14 sec</td><td>0.22 sec</td></tr>
818</table>
819
820<br>
821
822<a name="3.3fn1">[1]</a> The SSHv1 protocol is faster but is
823cryptographically weaker than SSHv2.<br>
824
825<a name="3.3fn2">[2]</a> At the time of writing, gcc generates
826relatively slow code on HPPA for RSA and Diffie-Hellman operations
827(see <a href= "http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7625">gcc
828bug #7625</a> and <a
829href="http://marc.info/?l=openssh-unix-dev&amp;m=102646106016694">
830discussion on openssh-unix-dev</a>).
831
832<h2><a name= "3.4">3.4 - "Can't locate module net-pf-10" messages in log under Linux.</a></h2>
833
834<p>
835The Linux kernel is looking (via modprobe) for protocol family 10 (IPv6).
836Either load the appropriate kernel module, enter the correct alias in
837<i>/etc/modules.conf</i> or disable IPv6 in <i>/etc/modules.conf</i>.
838
839
840<p>
841For some silly reason <i>/etc/modules.conf</i> may also be named
842<i>/etc/conf.modules</i>.
843
844
845<h2><a name= "3.5">3.5 - Password authentication doesn't work (eg on Slackware 7.0 or Red Hat 6.x)</a></h2>
846
847<p>
848If the password is correct password the login is still denied, the
849usual cause is that the system is configured to use MD5-type passwords
850but the
851<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=crypt&amp;sektion=3"
852>crypt(3)</a> function used by sshd doesn't understand them.
853
854<p>
855Affected accounts will have password strings in <i>/etc/passwd</i>
856or <i>/etc/shadow</i> that start with <b>$1$</b>.
857If password authentication fails for new accounts or accounts with
858recently changed passwords, but works for old accounts, this is the
859likely culprit.
860
861<p>
862The underlying cause is that some versions of OpenSSL have a crypt(3)
863function that does not understand MD5 passwords, and the link order of
864sshd means that OpenSSL's crypt(3) is used instead of the system's.
865OpensSSH's configure attempts to correct for this but is not always
866successful.
867
868<p>
869There are several possible solutions:
870
871<ul>
872<li>
873<p>
874Enable sshd's built-in support for MD5 passwords at build time.
875
876<blockquote>
877<table border=0 width="800">
878 <tr>
879 <td nowrap bgcolor="#EEEEEE">
880./configure --with-md5-passwords [options]
881 </td>
882 </tr>
883</table>
884</blockquote>
885
886This is safe even if you have both types of encryption as sshd will
887select the correct algorithm for each account automatically.
888
889<li>
890<p>
891If your system has a separate libcrypt library (eg Slackware 7) then you
892can manually add -lcrypt to the LIBS list so it's used instead of
893OpenSSL's:
894
895<blockquote>
896<table border=0 width="800">
897 <tr>
898 <td nowrap bgcolor="#EEEEEE">
899LIBS=-lcrypt ./configure [options]
900 </td>
901 </tr>
902</table>
903</blockquote>
904
905<li>
906<p>
907If your platforms supports PAM, you may configure sshd to use it
908(see <a href= "#3.15" >section 3.15</a>). This will mean that sshd will
909not verify passwords itself but will defer to the configured PAM modules.
910</ul>
911
912<h2><a name= "3.6">3.6 - Configure or sshd(8) complain about lack of RSA or DSA support</a></h2>
913
914<p>
915Ensure that your OpenSSL libraries have been built to include RSA or DSA
916support either internally or through RSAref.
917
918
919<h2><a name= "3.7">3.7 - "scp: command not found" errors</a></h2>
920
921<p>
922<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=scp&amp;sektion=1">scp(1)</a>
923must be in the default PATH on both the client and the server. You may
924need to use the <b>--with-default-path</b> option to specify a custom
925path to search on the server. This option replaces the default path,
926so you need to specify all the current directories on your path as well
927as where you have installed scp. For example:
928
929<blockquote>
930<table border=0 width="800">
931 <tr>
932 <td nowrap bgcolor="#EEEEEE">
933$ <b>./configure --with-default-path=/bin:/usr/bin:/usr/local/bin:/path/to/scp</b>
934 </td>
935 </tr>
936</table>
937</blockquote>
938
939<p>
940Note that configuration by the server's admin will take precedence over the
941setting of <b>--with-default-path</b>. This includes resetting PATH in
942<i>/etc/profile</i>, PATH in <i>/etc/environment</i> on AIX, or (for 3.7p1 and
943above) setting PATH or SUPATH in <i>/etc/default/login</i> on Solaris or
944Reliant Unix.
945
946<h2><a name= "3.8">3.8 - Unable to read passphrase</a></h2>
947
948<p>
949Some operating systems set <i>/dev/tty</i> with incorrect modes, causing
950the reading of passwords to fail with the following error:
951
952<blockquote>
953<table border=0 width="800">
954 <tr>
955 <td nowrap bgcolor="#EEEEEE">
956You have no controlling tty. Cannot read passphrase.
957 </td>
958 </tr>
959</table>
960</blockquote>
961
962<p>
963The solution to this is to reset the permissions on <i>/dev/tty</i>
964to mode 0666 and report the error as a bug to your OS vendor.
965
966
967<h2><a name= "3.9">3.9 - 'configure' missing or make fails</a></h2>
968
969<p>
970If there is no 'configure' file in the tar.gz file that you downloaded
971or make fails with "missing separator" errors, you have probably
972downloaded the OpenBSD distribution of OpenSSH and are attempting to
973compile it on another platform. Please refer to the information on the
974<a href="http://www.openssh.com/portable.html">portable version</a>.
975
976
977<h2><a name= "3.10">3.10 - Hangs when exiting ssh</a></h2>
978
979<p>
980OpenSSH may hang when exiting. This can occur when there is an active
981background process. This is known to occur on Linux and HP-UX.
982The problem can be verified by doing the following:
983
984<blockquote>
985<table border=0 width="800">
986 <tr>
987 <td nowrap bgcolor="#EEEEEE">
988$ <b>sleep 20 &amp; exit</b>
989 </td>
990 </tr>
991</table>
992</blockquote>
993
994Try to use this instead:
995<blockquote>
996<table border=0 width="800">
997 <tr>
998 <td nowrap bgcolor="#EEEEEE">
999$ <b>sleep 20 &lt; /dev/null &gt; /dev/null 2&gt;&amp;1 &amp;</b>
1000 </td>
1001 </tr>
1002</table>
1003</blockquote>
1004
1005<p>
1006A work around for bash users is to place <b>"shopt -s huponexit"</b>
1007in either /etc/bashrc or ~/.bashrc. Otherwise, consult your shell's
1008man page for an option to enable it to send a HUP signal to active
1009jobs when exiting. See <a
1010href="http://bugzilla.mindrot.org/show_bug.cgi?id=52">bug #52</a>
1011for other workarounds.
1012
1013<h2><a name= "3.11">3.11 - Why does ssh hang on exit?</a></h2>
1014
1015<p>
1016When executing
1017<blockquote>
1018<table border=0 width="800">
1019 <tr>
1020 <td nowrap bgcolor="#EEEEEE">
1021$ <b>ssh host command</b>
1022 </td>
1023 </tr>
1024</table>
1025</blockquote>
1026ssh <b>needs</b> to hang, because it needs to wait:
1027<ul>
1028<li>
1029until it can be sure that <code>command</code> does not need
1030more input.
1031<li>
1032until it can be sure that <code>command</code> does not produce
1033more output.
1034<li>
1035until <code>command</code> exits because sshd needs to tell
1036the exit status from <code>command</code> to ssh.
1037</ul>
1038<p>
1039
1040<h2><a name= "3.12">3.12 - I upgraded to OpenSSH 3.1 and X11
1041forwarding stopped working.</a></h2>
1042
1043Starting with OpenSSH 3.1, the sshd x11 forwarding server listens on
1044localhost by default; see the sshd <b>X11UseLocalhost</b> option to
1045revert to prior behaviour if your older X11 clients do not function
1046with this configuration.<p>
1047
1048In general, X11 clients using X11 R6 should work with the default
1049setting. Some vendors, including HP, ship X11 clients with R6
1050and R5 libs, so some clients will work, and others will not work.
1051This is true for HP-UX 11.X.<p>
1052
1053<h2><a name= "3.13">3.13 - I upgraded to OpenSSH 3.8 and some
1054X11 programs stopped working.</a></h2>
1055
1056<p>
1057As documented in the <a href="http://www.openssh.com/txt/release-3.8">3.8 release notes</a>,
1058<code>ssh</code> will now use untrusted X11 cookies by
1059default. The previous behaviour can be restored by setting
1060<b>ForwardX11Trusted yes</b> in <i>ssh_config</i>.
1061
1062<p>
1063Possible symptoms include:<br>
1064<code>BadWindow (invalid Window parameter)<br>
1065BadAccess (attempt to access private resource denied)<br>
1066X Error of failed request: BadAtom (invalid Atom parameter)<br>
1067Major opcode of failed request: 20 (X_GetProperty)<br></code>
1068
1069<h2><a name= "3.14">3.14 - I copied my public key to authorized_keys
1070but public-key authentication still doesn't work.</a></h2>
1071
1072<p>
1073Typically this is caused by the file permissions on $HOME, $HOME/.ssh or
1074$HOME/.ssh/authorized_keys being more permissive than sshd allows by default.
1075
1076<p>
1077In this case, it can be solved by executing the following on the server.
1078<blockquote>
1079<table border=0 width="800">
1080<tr>
1081 <td nowrap bgcolor="#EEEEEE">
1082$ <b>chmod go-w $HOME $HOME/.ssh</b><br>
1083$ <b>chmod 600 $HOME/.ssh/authorized_keys</b><br>
1084$ <b>chown `whoami` $HOME/.ssh/authorized_keys</b><br>
1085 </td>
1086</tr>
1087</table>
1088</blockquote>
1089
1090<p>
1091If this is not possible for some reason, an alternative is to set
1092<b>StrictModes no</b> in <i>sshd_config</i>, however this is not
1093recommended.
1094
1095<h2><a name= "3.15">3.15 - OpenSSH versions and PAM behaviour.</a></h2>
1096
1097Portable OpenSSH has a configure-time option to enable sshd's use of the
1098<a href="http://www.opengroup.org/onlinepubs/008329799/">PAM</a>
1099(Pluggable Authentication Modules) interface.
1100
1101<blockquote>
1102<table border=0 width="800">
1103 <tr>
1104 <td nowrap bgcolor="#EEEEEE">
1105./configure --with-pam [options]
1106 </td>
1107 </tr>
1108</table>
1109</blockquote>
1110
1111To use PAM at all, this option must be provided at build time.
1112The run-time behaviour when PAM is built in varies with the version of
1113Portable OpenSSH, and on later versions it must also be enabled by setting
1114<b>UsePAM</b> to <b>yes</b> in <i>sshd_config</i>.
1115
1116<p>
1117The behaviour of the relevant authentications options when PAM support is built
1118in is summarised by the following table.
1119
1120<p>
1121<table border="1">
1122 <tr> <th>Version</th> <th>UsePAM</th> <th>PasswordAuthentication</th> <th>ChallengeResponseAuthentication</th> </tr>
1123 <tr>
1124 <td>&lt;=3.6.1p2</td>
1125 <td>Not applicable</td>
1126 <td>Uses PAM</td>
1127 <td>Uses PAM if <b>PAMAuthenticationViaKbdInt</b> is enabled</td>
1128 </tr>
1129 <tr>
1130 <td>3.7p1 - 3.7.1p1</td>
1131 <td>Defaults to <b>yes</b></td>
1132 <td>Does not use PAM</td>
1133 <td>Uses PAM if <b>UsePAM</b> is enabled</td>
1134 </tr>
1135 <tr>
1136 <td>3.7.1p2 - 3.8.1p1</td>
1137 <td>Defaults to <b>no</b></td>
1138 <td>Does not use PAM <a href="#3.15fn1">[1]</a></td>
1139 <td>Uses PAM if <b>UsePAM</b> is enabled</td>
1140 </tr>
1141 <tr>
1142 <td>3.9p1</td>
1143 <td>Defaults to <b>no</b></td>
1144 <td>Uses PAM if <b>UsePAM</b> is enabled</td>
1145 <td>Uses PAM if <b>UsePAM</b> is enabled</td>
1146 </tr>
1147</table>
1148<p>
1149
1150<a name= "3.15fn1">[1]</a> Some vendors, notably Redhat/Fedora, have
1151backported the PasswordAuthentication from 3.9p1 to their 3.8x based
1152packages. If you're using a vendor-supplied package then consult their
1153documentation.
1154
1155<p>
1156OpenSSH Portable's PAM interface still has problems with a few modules,
1157however we hope that this number will reduce in the future. As at the
11583.9p1 release, the known problems are:
1159
1160<ul>
1161 <li>Modules relying on module-private data (eg pam_dhkeys, pam_krb5, AFS)
1162 may fail to correctly establish credentials (bug <a
1163 href="http://bugzilla.mindrot.org/show_bug.cgi?id=688">#688</a>) when
1164 authenticating via <b>ChallengeResponseAuthentication</b>.
1165 <b>PasswordAuthentication</b> with 3.9p1 and above should work.
1166</ul>
1167
1168You can also check <a
1169href="http://bugzilla.mindrot.org/buglist.cgi?product=Portable+OpenSSH&amp;bug_status=RESOLVED&amp;bug_status=NEW&amp;bug_status=ACCEPTED&amp;component=PAM+support"
1170>bugzilla for current PAM issues</a>.
1171
1172<h2><a name= "3.16">3.16 - Why doesn't "w" or "who" on AIX 5.x show users
1173logged in via ssh?</a></h2>
1174
1175Between AIX 4.3.3 and AIX 5.x, the format of the wtmp struct changed. This
1176means that sshd binaries built on AIX 4.x will not correctly write wtmp
1177entries when run on AIX 5.x. This can be fixed by simply recompiling
1178sshd on an AIX 5.x system and using that.
1179
1180<hr>
1181<a href="http://www.openssh.com/index.html"><img height=24 width=24 src="back.gif" border=0 alt=OpenSSH></a>
1182<a href="mailto:www@openbsd.org">www@openbsd.org</a>
1183<br>
1184<small>$OpenBSD: faq.html,v 1.113 2012/04/21 12:12:22 dtucker Exp $</small>
1185
1186</body>
1187</html>
diff --git a/debian/gnome-ssh-askpass.1 b/debian/gnome-ssh-askpass.1
new file mode 100644
index 000000000..b74c410a8
--- /dev/null
+++ b/debian/gnome-ssh-askpass.1
@@ -0,0 +1,51 @@
1.TH GNOME-SSH-ASKPASS 1
2.SH NAME
3gnome\-ssh\-askpass \- prompts a user for a passphrase using GNOME
4.SH SYNOPSIS
5.B gnome\-ssh\-askpass
6.SH DESCRIPTION
7.B gnome\-ssh\-askpass
8is a GNOME-based passphrase dialog for use with OpenSSH.
9It is intended to be called by the
10.BR ssh\-add (1)
11program and not invoked directly.
12It allows
13.BR ssh\-add (1)
14to obtain a passphrase from a user, even if not connected to a terminal
15(assuming that an X display is available).
16This happens automatically in the case where
17.B ssh\-add
18is invoked from one's
19.B ~/.xsession
20or as one of the GNOME startup programs, for example.
21.PP
22In order to be called automatically by
23.BR ssh\-add ,
24.B gnome\-ssh\-askpass
25should be installed as
26.IR /usr/bin/ssh\-askpass .
27.SH "ENVIRONMENT VARIABLES"
28The following environment variables are recognized:
29.TP
30.I GNOME_SSH_ASKPASS_GRAB_SERVER
31Causes
32.B gnome\-ssh\-askpass
33to grab the X server before asking for a passphrase.
34.TP
35.I GNOME_SSH_ASKPASS_GRAB_POINTER
36Causes
37.B gnome\-ssh\-askpass
38to grab the mouse pointer using
39.IR gdk_pointer_grab ()
40before asking for a passphrase.
41.PP
42Regardless of whether either of these environment variables is set,
43.B gnome\-ssh\-askpass
44will grab the keyboard using
45.IR gdk_keyboard_grab ().
46.SH AUTHOR
47This manual page was written by Colin Watson <cjwatson@debian.org>
48for the Debian system (but may be used by others).
49It was based on that for
50.B x11\-ssh\-askpass
51by Philip Hands.
diff --git a/debian/keygen-test/Makefile b/debian/keygen-test/Makefile
new file mode 100644
index 000000000..666ed8227
--- /dev/null
+++ b/debian/keygen-test/Makefile
@@ -0,0 +1,12 @@
1test: getpid.so
2 chmod +x keygen-test
3 ./keygen-test
4
5getpid.o: getpid.c
6 gcc -fPIC -c $< -o $@
7
8getpid.so: getpid.o
9 gcc -shared -o $@ $<
10
11clean:
12 rm -f getpid.o getpid.so key1 key1.pub key2 key2.pub
diff --git a/debian/keygen-test/getpid.c b/debian/keygen-test/getpid.c
new file mode 100644
index 000000000..c9e35b87e
--- /dev/null
+++ b/debian/keygen-test/getpid.c
@@ -0,0 +1,39 @@
1/*
2 * Compile:
3
4gcc -fPIC -c getpid.c -o getpid.o
5gcc -shared -o getpid.so getpid.o
6
7 * Use:
8
9FORCE_PID=1234 LD_PRELOAD=./getpid.so bash
10
11#
12# Copyright (C) 2001-2008 Kees Cook
13# kees@outflux.net, http://outflux.net/
14#
15# This program is free software; you can redistribute it and/or
16# modify it under the terms of the GNU General Public License
17# as published by the Free Software Foundation; either version 2
18# of the License, or (at your option) any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License
26# along with this program; if not, write to the Free Software
27# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28# http://www.gnu.org/copyleft/gpl.html
29
30*/
31
32#include <sys/types.h>
33#include <unistd.h>
34#include <stdlib.h>
35
36pid_t getpid(void)
37{
38 return atoi(getenv("FORCE_PID"));
39}
diff --git a/debian/keygen-test/keygen-test b/debian/keygen-test/keygen-test
new file mode 100755
index 000000000..2abe815ef
--- /dev/null
+++ b/debian/keygen-test/keygen-test
@@ -0,0 +1,12 @@
1#! /bin/sh
2
3rm -f key1 key1.pub key2 key2.pub
4LD_PRELOAD="$(pwd)/getpid.so" FORCE_PID=1234 \
5 ../build-deb/ssh-keygen -N '' -f key1 >/dev/null
6LD_PRELOAD="$(pwd)/getpid.so" FORCE_PID=1234 \
7 ../build-deb/ssh-keygen -N '' -f key2 >/dev/null
8if cmp -s key1 key2; then
9 echo "Generated two identical keys!" >&2
10 exit 1
11fi
12exit 0
diff --git a/debian/openssh-client-udeb.install b/debian/openssh-client-udeb.install
new file mode 100644
index 000000000..b3891f02d
--- /dev/null
+++ b/debian/openssh-client-udeb.install
@@ -0,0 +1,3 @@
1scp usr/bin
2sftp usr/bin
3ssh usr/bin
diff --git a/debian/openssh-client.apport b/debian/openssh-client.apport
new file mode 100644
index 000000000..3dbc8e5e6
--- /dev/null
+++ b/debian/openssh-client.apport
@@ -0,0 +1,32 @@
1#!/usr/bin/python
2
3'''apport hook for openssh-client
4
5(c) 2010 Canonical Ltd.
6Author: Chuck Short <chuck.short@canonical.com>
7
8This program is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License as published by the
10Free Software Foundation; either version 2 of the License, or (at your
11option) any later version. See http://www.gnu.org/copyleft/gpl.html for
12the full text of the license.
13'''
14
15from apport.hookutils import *
16
17def add_info(report, ui):
18 response = ui.yesno("The contents of your /etc/ssh/ssh_config file "
19 "may help developers diagnose your bug more "
20 "quickly. However, it may contain sensitive "
21 "information. Do you want to include it in your "
22 "bug report?")
23
24 if response == None: # user cancelled
25 raise StopIteration
26
27 elif response == True:
28 attach_conffiles(report, 'openssh-client')
29
30 attach_related_packages(report,
31 ['ssh-askpass', 'libpam-ssh', 'keychain', 'ssh-askpass-gnome'])
32 report['SSHClientVersion'] = command_output(['/usr/bin/ssh', '-V'])
diff --git a/debian/openssh-client.docs b/debian/openssh-client.docs
new file mode 100644
index 000000000..d80ec1262
--- /dev/null
+++ b/debian/openssh-client.docs
@@ -0,0 +1,6 @@
1ChangeLog.gssapi
2OVERVIEW
3README
4README.dns
5README.tun
6debian/faq.html
diff --git a/debian/openssh-client.install b/debian/openssh-client.install
new file mode 100755
index 000000000..838f98116
--- /dev/null
+++ b/debian/openssh-client.install
@@ -0,0 +1,36 @@
1#! /usr/bin/dh-exec
2
3etc/ssh/moduli
4etc/ssh/ssh_config
5usr/bin/scp
6usr/bin/sftp
7usr/bin/ssh
8usr/bin/ssh-add
9usr/bin/ssh-agent
10usr/bin/ssh-keygen
11usr/bin/ssh-keyscan
12usr/lib/openssh/ssh-keysign
13usr/lib/openssh/ssh-pkcs11-helper
14usr/share/man/man1/scp.1
15usr/share/man/man1/sftp.1
16usr/share/man/man1/ssh-add.1
17usr/share/man/man1/ssh-agent.1
18usr/share/man/man1/ssh-keygen.1
19usr/share/man/man1/ssh-keyscan.1
20usr/share/man/man1/ssh.1
21usr/share/man/man5/moduli.5
22usr/share/man/man5/ssh_config.5
23usr/share/man/man8/ssh-keysign.8
24usr/share/man/man8/ssh-pkcs11-helper.8
25
26contrib/ssh-copy-id usr/bin
27debian/ssh-argv0 usr/bin
28
29debian/agent-launch usr/lib/openssh
30
31# dh_apport would be neater, but at the time of writing it isn't in unstable
32# yet.
33debian/openssh-client.apport => usr/share/apport/package-hooks/openssh-client.py
34
35# systemd user unit (only used under sessions)
36debian/systemd/ssh-agent.service usr/lib/systemd/user
diff --git a/debian/openssh-client.links b/debian/openssh-client.links
new file mode 100644
index 000000000..1d94c74e8
--- /dev/null
+++ b/debian/openssh-client.links
@@ -0,0 +1,4 @@
1usr/bin/ssh usr/bin/slogin
2usr/share/man/man1/ssh.1 usr/share/man/man1/slogin.1
3# enable systemd user unit for graphical sessions that use systemd
4usr/lib/systemd/user/ssh-agent.service usr/lib/systemd/user/graphical-session-pre.target.wants/ssh-agent.service
diff --git a/debian/openssh-client.lintian-overrides b/debian/openssh-client.lintian-overrides
new file mode 100644
index 000000000..486567744
--- /dev/null
+++ b/debian/openssh-client.lintian-overrides
@@ -0,0 +1 @@
openssh-client: setuid-binary usr/lib/openssh/ssh-keysign 4755 root/root
diff --git a/debian/openssh-client.manpages b/debian/openssh-client.manpages
new file mode 100644
index 000000000..690bd8a22
--- /dev/null
+++ b/debian/openssh-client.manpages
@@ -0,0 +1,2 @@
1contrib/ssh-copy-id.1
2debian/ssh-argv0.1
diff --git a/debian/openssh-client.postinst b/debian/openssh-client.postinst
new file mode 100644
index 000000000..ec0ad2b2b
--- /dev/null
+++ b/debian/openssh-client.postinst
@@ -0,0 +1,45 @@
1#!/bin/sh
2set -e
3
4action="$1"
5oldversion="$2"
6
7umask 022
8
9
10create_alternatives() {
11# Create alternatives for the various r* tools.
12# Make sure we don't change existing alternatives that a user might have
13# changed, but clean up after some old alternatives that mistakenly pointed
14# rlogin and rcp to ssh.
15 update-alternatives --quiet --remove rlogin /usr/bin/ssh
16 update-alternatives --quiet --remove rcp /usr/bin/ssh
17 for cmd in rsh rlogin rcp; do
18 scmd="s${cmd#r}"
19 if ! update-alternatives --display "$cmd" 2>/dev/null | \
20 grep -q "$scmd"; then
21 update-alternatives --quiet --install "/usr/bin/$cmd" "$cmd" "/usr/bin/$scmd" 20 \
22 --slave "/usr/share/man/man1/$cmd.1.gz" "$cmd.1.gz" "/usr/share/man/man1/$scmd.1.gz"
23 fi
24 done
25}
26
27set_ssh_agent_permissions() {
28 if ! getent group ssh >/dev/null; then
29 addgroup --system --quiet ssh
30 fi
31 if ! dpkg-statoverride --list /usr/bin/ssh-agent >/dev/null; then
32 chgrp ssh /usr/bin/ssh-agent
33 chmod 2755 /usr/bin/ssh-agent
34 fi
35}
36
37
38if [ "$action" = configure ]; then
39 create_alternatives
40 set_ssh_agent_permissions
41fi
42
43#DEBHELPER#
44
45exit 0
diff --git a/debian/openssh-client.postrm b/debian/openssh-client.postrm
new file mode 100644
index 000000000..12fb3671d
--- /dev/null
+++ b/debian/openssh-client.postrm
@@ -0,0 +1,22 @@
1#!/bin/sh
2set -e
3
4#DEBHELPER#
5
6case $1 in
7 purge)
8 # Remove all non-conffiles that ssh might create, so that we
9 # can smoothly remove /etc/ssh if and only if the user
10 # hasn't dropped some other files in there. Conffiles have
11 # already been removed at this point.
12 rm -f /etc/ssh/moduli /etc/ssh/primes
13 rm -f /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2
14 [ ! -d /etc/ssh ] || rmdir --ignore-fail-on-non-empty /etc/ssh
15
16 if which delgroup >/dev/null 2>&1; then
17 delgroup --quiet ssh > /dev/null || true
18 fi
19 ;;
20esac
21
22exit 0
diff --git a/debian/openssh-client.prerm b/debian/openssh-client.prerm
new file mode 100644
index 000000000..2d631cb9c
--- /dev/null
+++ b/debian/openssh-client.prerm
@@ -0,0 +1,39 @@
1#! /bin/sh
2# prerm script for ssh
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <prerm> `remove'
10# * <old-prerm> `upgrade' <new-version>
11# * <new-prerm> `failed-upgrade' <old-version>
12# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
13# * <deconfigured's-prerm> `deconfigure' `in-favour'
14# <package-being-installed> <version> `removing'
15# <conflicting-package> <version>
16# for details, see /usr/share/doc/packaging-manual/
17
18case "$1" in
19 remove|deconfigure)
20 update-alternatives --quiet --remove rsh /usr/bin/ssh
21 update-alternatives --quiet --remove rlogin /usr/bin/slogin
22 update-alternatives --quiet --remove rcp /usr/bin/scp
23 ;;
24 upgrade)
25 ;;
26 failed-upgrade)
27 ;;
28 *)
29 echo "prerm called with unknown argument \`$1'" >&2
30 exit 0
31 ;;
32esac
33
34# dh_installdeb will replace this with shell code automatically
35# generated by other debhelper scripts.
36
37#DEBHELPER#
38
39exit 0
diff --git a/debian/openssh-server-udeb.dirs b/debian/openssh-server-udeb.dirs
new file mode 100644
index 000000000..e730fc43d
--- /dev/null
+++ b/debian/openssh-server-udeb.dirs
@@ -0,0 +1 @@
run/sshd
diff --git a/debian/openssh-server-udeb.install b/debian/openssh-server-udeb.install
new file mode 100644
index 000000000..05ccbf7af
--- /dev/null
+++ b/debian/openssh-server-udeb.install
@@ -0,0 +1,2 @@
1sshd usr/sbin
2ssh-keygen usr/bin
diff --git a/debian/openssh-server.apport b/debian/openssh-server.apport
new file mode 100644
index 000000000..3644bd855
--- /dev/null
+++ b/debian/openssh-server.apport
@@ -0,0 +1,28 @@
1#!/usr/bin/python
2
3'''apport hook for openssh-server
4
5(c) 2010 Canonical Ltd.
6Author: Chuck Short <chuck.short@canonical.com>
7
8This program is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License as published by the
10Free Software Foundation; either version 2 of the License, or (at your
11option) any later version. See http://www.gnu.org/copyleft/gpl.html for
12the full text of the license.
13'''
14
15from apport.hookutils import *
16
17def add_info(report, ui):
18 response = ui.yesno("The contents of your /etc/ssh/sshd_config file "
19 "may help developers diagnose your bug more "
20 "quickly. However, it may contain sensitive "
21 "information. Do you want to include it in your "
22 "bug report?")
23
24 if response == None: # user cancelled
25 raise StopIteration
26
27 elif response == True:
28 report['SSHDConfig'] = root_command_output(['/usr/sbin/sshd', '-T'])
diff --git a/debian/openssh-server.config b/debian/openssh-server.config
new file mode 100644
index 000000000..4a66a35e9
--- /dev/null
+++ b/debian/openssh-server.config
@@ -0,0 +1,46 @@
1#! /bin/sh
2set -e
3
4. /usr/share/debconf/confmodule
5db_version 2.0
6
7get_config_option() {
8 option="$1"
9
10 [ -f /etc/ssh/sshd_config ] || return
11
12 # TODO: actually only one '=' allowed after option
13 perl -lne '
14 s/[[:space:]]+/ /g; s/[[:space:]]+$//;
15 print if s/^[[:space:]]*'"$option"'[[:space:]=]+//i' \
16 /etc/ssh/sshd_config 2>/dev/null
17}
18
19permit_root_login="$(get_config_option PermitRootLogin)" || true
20password_authentication="$(get_config_option PasswordAuthentication)" || true
21if [ -f /etc/ssh/sshd_config ]; then
22 # Make sure the debconf database is in sync with the current state
23 # of the system.
24 if [ "$permit_root_login" = yes ]; then
25 db_set openssh-server/permit-root-login false
26 else
27 db_set openssh-server/permit-root-login true
28 fi
29 if [ "$password_authentication" = no ]; then
30 db_set openssh-server/password-authentication false
31 else
32 db_set openssh-server/password-authentication true
33 fi
34fi
35
36if dpkg --compare-versions "$2" lt-nl 1:6.6p1-1 && \
37 [ "$permit_root_login" = yes ]; then
38 if [ "$(getent shadow root | cut -d: -f2)" = "!" ]; then
39 db_set openssh-server/permit-root-login true
40 else
41 db_input high openssh-server/permit-root-login || true
42 db_go
43 fi
44fi
45
46exit 0
diff --git a/debian/openssh-server.examples b/debian/openssh-server.examples
new file mode 100644
index 000000000..9f15e1fa7
--- /dev/null
+++ b/debian/openssh-server.examples
@@ -0,0 +1 @@
debian/systemd/ssh-session-cleanup.service
diff --git a/debian/openssh-server.if-up b/debian/openssh-server.if-up
new file mode 100644
index 000000000..525c2153b
--- /dev/null
+++ b/debian/openssh-server.if-up
@@ -0,0 +1,42 @@
1#! /bin/sh
2# Reload the OpenSSH server when an interface comes up, to allow it to start
3# listening on new addresses.
4
5set -e
6
7# Don't bother to restart sshd when lo is configured.
8if [ "$IFACE" = lo ]; then
9 exit 0
10fi
11
12# Only run from ifup.
13if [ "$MODE" != start ]; then
14 exit 0
15fi
16
17# OpenSSH only cares about inet and inet6. Get ye gone, strange people
18# still using ipx.
19if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
20 exit 0
21fi
22
23# Is /usr mounted?
24if [ ! -e /usr/sbin/sshd ]; then
25 exit 0
26fi
27
28if [ ! -f /run/sshd.pid ] || \
29 [ "$(ps -p "$(cat /run/sshd.pid)" -o comm=)" != sshd ]; then
30 exit 0
31fi
32
33# We'd like to use 'reload' here, but it has some problems; see #502444. On
34# the other hand, repeated restarts of ssh make systemd unhappy
35# (#756547/#757822), so use reload in that case.
36if [ -d /run/systemd/system ]; then
37 systemctl reload --no-block ssh.service >/dev/null 2>&1 || true
38else
39 invoke-rc.d ssh restart >/dev/null 2>&1 || true
40fi
41
42exit 0
diff --git a/debian/openssh-server.install b/debian/openssh-server.install
new file mode 100755
index 000000000..a2d8fed78
--- /dev/null
+++ b/debian/openssh-server.install
@@ -0,0 +1,19 @@
1#! /usr/bin/dh-exec
2
3usr/sbin/sshd
4usr/share/man/man5/authorized_keys.5
5usr/share/man/man5/sshd_config.5
6usr/share/man/man8/sshd.8
7
8sshd_config => usr/share/openssh/sshd_config
9debian/openssh-server.ucf-md5sum => usr/share/openssh/sshd_config.md5sum
10
11debian/openssh-server.if-up => etc/network/if-up.d/openssh-server
12debian/openssh-server.ufw.profile => etc/ufw/applications.d/openssh-server
13debian/systemd/ssh.socket lib/systemd/system
14debian/systemd/ssh@.service lib/systemd/system
15debian/systemd/ssh-session-cleanup usr/lib/openssh
16
17# dh_apport would be neater, but at the time of writing it isn't in unstable
18# yet.
19debian/openssh-server.apport => usr/share/apport/package-hooks/openssh-server.py
diff --git a/debian/openssh-server.links b/debian/openssh-server.links
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/debian/openssh-server.links
diff --git a/debian/openssh-server.lintian-overrides b/debian/openssh-server.lintian-overrides
new file mode 100644
index 000000000..17d912cb0
--- /dev/null
+++ b/debian/openssh-server.lintian-overrides
@@ -0,0 +1 @@
openssh-server: package-contains-empty-directory usr/share/doc/openssh-client/
diff --git a/debian/openssh-server.maintscript b/debian/openssh-server.maintscript
new file mode 100644
index 000000000..17a4c2787
--- /dev/null
+++ b/debian/openssh-server.maintscript
@@ -0,0 +1,2 @@
1mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd 1:4.7p1-4~
2rm_conffile /etc/init/ssh.conf 1:7.5p1-6~
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
new file mode 100644
index 000000000..ae273e9c8
--- /dev/null
+++ b/debian/openssh-server.postinst
@@ -0,0 +1,157 @@
1#!/bin/sh
2set -e
3
4. /usr/share/debconf/confmodule
5db_version 2.0
6
7action="$1"
8oldversion="$2"
9
10umask 022
11
12
13get_config_option() {
14 option="$1"
15
16 [ -f /etc/ssh/sshd_config ] || return
17
18 # TODO: actually only one '=' allowed after option
19 perl -lne '
20 s/[[:space:]]+/ /g; s/[[:space:]]+$//;
21 print if s/^[[:space:]]*'"$option"'[[:space:]=]+//i' \
22 /etc/ssh/sshd_config
23}
24
25
26host_keys_required() {
27 hostkeys="$(get_config_option HostKey)"
28 if [ "$hostkeys" ]; then
29 echo "$hostkeys"
30 else
31 # No HostKey directives at all, so the server picks some
32 # defaults.
33 echo /etc/ssh/ssh_host_rsa_key
34 echo /etc/ssh/ssh_host_ecdsa_key
35 echo /etc/ssh/ssh_host_ed25519_key
36 fi
37}
38
39
40create_key() {
41 msg="$1"
42 shift
43 hostkeys="$1"
44 shift
45 file="$1"
46 shift
47
48 if echo "$hostkeys" | grep -x "$file" >/dev/null && \
49 [ ! -f "$file" ] ; then
50 echo -n $msg
51 ssh-keygen -q -f "$file" -N '' "$@"
52 echo
53 if which restorecon >/dev/null 2>&1; then
54 restorecon "$file" "$file.pub"
55 fi
56 ssh-keygen -l -f "$file.pub"
57 fi
58}
59
60
61create_keys() {
62 hostkeys="$(host_keys_required)"
63
64 create_key "Creating SSH2 RSA key; this may take some time ..." \
65 "$hostkeys" /etc/ssh/ssh_host_rsa_key -t rsa
66 create_key "Creating SSH2 DSA key; this may take some time ..." \
67 "$hostkeys" /etc/ssh/ssh_host_dsa_key -t dsa
68 create_key "Creating SSH2 ECDSA key; this may take some time ..." \
69 "$hostkeys" /etc/ssh/ssh_host_ecdsa_key -t ecdsa
70 create_key "Creating SSH2 ED25519 key; this may take some time ..." \
71 "$hostkeys" /etc/ssh/ssh_host_ed25519_key -t ed25519
72}
73
74
75new_config=
76
77cleanup() {
78 if [ "$new_config" ]; then
79 rm -f "$new_config"
80 fi
81}
82
83
84create_sshdconfig() {
85 # XXX cjwatson 2016-12-24: This debconf template is very confusingly
86 # named; its description is "Disable SSH password authentication for
87 # root?", so true -> prohibit-password (the upstream default),
88 # false -> yes.
89 db_get openssh-server/permit-root-login
90 permit_root_login="$RET"
91 db_get openssh-server/password-authentication
92 password_authentication="$RET"
93
94 trap cleanup EXIT
95 new_config="$(tempfile)"
96 cp -a /usr/share/openssh/sshd_config "$new_config"
97 if [ "$permit_root_login" != true ]; then
98 sed -i 's/^#*PermitRootLogin .*/PermitRootLogin yes/' \
99 "$new_config"
100 fi
101 if [ "$password_authentication" != true ]; then
102 sed -i 's/^#PasswordAuthentication .*/PasswordAuthentication no/' \
103 "$new_config"
104 fi
105 mkdir -p /etc/ssh
106 ucf --three-way --debconf-ok \
107 --sum-file /usr/share/openssh/sshd_config.md5sum \
108 "$new_config" /etc/ssh/sshd_config
109 ucfr openssh-server /etc/ssh/sshd_config
110}
111
112fix_statoverride() {
113# Remove an erronous override for sshd (we should have overridden ssh)
114 if dpkg-statoverride --list /usr/sbin/sshd >/dev/null; then
115 dpkg-statoverride --remove /usr/sbin/sshd
116 fi
117}
118
119setup_sshd_user() {
120 if ! getent passwd sshd >/dev/null; then
121 adduser --quiet --system --no-create-home --home /run/sshd --shell /usr/sbin/nologin sshd
122 fi
123}
124
125if [ "$action" = configure ]; then
126 create_sshdconfig
127 create_keys
128 fix_statoverride
129 setup_sshd_user
130 # Renamed to /etc/ssh/moduli in 2.9.9 (!)
131 if dpkg --compare-versions "$2" lt-nl 1:4.7p1-1; then
132 rm -f /etc/ssh/primes
133 fi
134 if dpkg --compare-versions "$2" lt-nl 1:5.5p1-6; then
135 rm -f /run/sshd/.placeholder
136 fi
137 if dpkg --compare-versions "$2" lt-nl 1:6.5p1-2 && \
138 deb-systemd-helper debian-installed ssh.socket && \
139 deb-systemd-helper --quiet was-enabled ssh.service && \
140 deb-systemd-helper --quiet was-enabled ssh.socket; then
141 # 1:6.5p1-1 mistakenly left both ssh.service and ssh.socket
142 # enabled.
143 deb-systemd-helper disable ssh.socket >/dev/null || true
144 fi
145 if dpkg --compare-versions "$2" lt-nl 1:6.5p1-3 && \
146 [ -d /run/systemd/system ]; then
147 # We must stop the sysvinit-controlled sshd before we can
148 # restart it under systemd.
149 start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd || true
150 fi
151fi
152
153#DEBHELPER#
154
155db_stop
156
157exit 0
diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm
new file mode 100644
index 000000000..4a716f563
--- /dev/null
+++ b/debian/openssh-server.postrm
@@ -0,0 +1,35 @@
1#!/bin/sh
2set -e
3
4#DEBHELPER#
5
6case $1 in
7 purge)
8 # Remove all non-conffiles that ssh might create, so that we
9 # can smoothly remove /etc/ssh if and only if the user
10 # hasn't dropped some other files in there. Conffiles have
11 # already been removed at this point.
12 rm -f /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.pub
13 rm -f /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_rsa_key.pub
14 rm -f /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_dsa_key.pub
15 rm -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ecdsa_key.pub
16 rm -f /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_ed25519_key.pub
17 for ext in .ucf-new .ucf-old .ucf-dist ""; do
18 rm -f "/etc/ssh/sshd_config$ext"
19 done
20 if which ucf >/dev/null 2>&1; then
21 ucf --purge /etc/ssh/sshd_config
22 fi
23 if which ucfr >/dev/null 2>&1; then
24 ucfr --purge openssh-server /etc/ssh/sshd_config
25 fi
26 rm -f /etc/ssh/sshd_not_to_be_run
27 [ ! -d /etc/ssh ] || rmdir --ignore-fail-on-non-empty /etc/ssh
28
29 if which deluser >/dev/null 2>&1; then
30 deluser --quiet sshd > /dev/null || true
31 fi
32 ;;
33esac
34
35exit 0
diff --git a/debian/openssh-server.preinst b/debian/openssh-server.preinst
new file mode 100644
index 000000000..f5b75124e
--- /dev/null
+++ b/debian/openssh-server.preinst
@@ -0,0 +1,18 @@
1#!/bin/sh
2set -e
3
4action=$1
5version=$2
6
7if [ "$action" = upgrade ] || [ "$action" = install ]
8then
9 if dpkg --compare-versions "$version" lt 1:5.5p1-6 && \
10 [ -d /run/sshd ]; then
11 # make sure /run/sshd is not removed on upgrades
12 touch /run/sshd/.placeholder
13 fi
14fi
15
16#DEBHELPER#
17
18exit 0
diff --git a/debian/openssh-server.ssh.default b/debian/openssh-server.ssh.default
new file mode 100644
index 000000000..304042224
--- /dev/null
+++ b/debian/openssh-server.ssh.default
@@ -0,0 +1,5 @@
1# Default settings for openssh-server. This file is sourced by /bin/sh from
2# /etc/init.d/ssh.
3
4# Options to pass to sshd
5SSHD_OPTS=
diff --git a/debian/openssh-server.ssh.init b/debian/openssh-server.ssh.init
new file mode 100644
index 000000000..f25000883
--- /dev/null
+++ b/debian/openssh-server.ssh.init
@@ -0,0 +1,162 @@
1#! /bin/sh
2
3### BEGIN INIT INFO
4# Provides: sshd
5# Required-Start: $remote_fs $syslog
6# Required-Stop: $remote_fs $syslog
7# Default-Start: 2 3 4 5
8# Default-Stop:
9# Short-Description: OpenBSD Secure Shell server
10### END INIT INFO
11
12set -e
13
14# /etc/init.d/ssh: start and stop the OpenBSD "secure shell(tm)" daemon
15
16test -x /usr/sbin/sshd || exit 0
17( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0
18
19umask 022
20
21if test -f /etc/default/ssh; then
22 . /etc/default/ssh
23fi
24
25. /lib/lsb/init-functions
26
27if [ -n "$2" ]; then
28 SSHD_OPTS="$SSHD_OPTS $2"
29fi
30
31# Are we running from init?
32run_by_init() {
33 ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
34}
35
36check_for_no_start() {
37 # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists
38 if [ -e /etc/ssh/sshd_not_to_be_run ]; then
39 if [ "$1" = log_end_msg ]; then
40 log_end_msg 0 || true
41 fi
42 if ! run_by_init; then
43 log_action_msg "OpenBSD Secure Shell server not in use (/etc/ssh/sshd_not_to_be_run)" || true
44 fi
45 exit 0
46 fi
47}
48
49check_dev_null() {
50 if [ ! -c /dev/null ]; then
51 if [ "$1" = log_end_msg ]; then
52 log_end_msg 1 || true
53 fi
54 if ! run_by_init; then
55 log_action_msg "/dev/null is not a character device!" || true
56 fi
57 exit 1
58 fi
59}
60
61check_privsep_dir() {
62 # Create the PrivSep empty dir if necessary
63 if [ ! -d /run/sshd ]; then
64 mkdir /run/sshd
65 chmod 0755 /run/sshd
66 fi
67}
68
69check_config() {
70 if [ ! -e /etc/ssh/sshd_not_to_be_run ]; then
71 /usr/sbin/sshd $SSHD_OPTS -t || exit 1
72 fi
73}
74
75export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
76
77case "$1" in
78 start)
79 check_privsep_dir
80 check_for_no_start
81 check_dev_null
82 log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" || true
83 if start-stop-daemon --start --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then
84 log_end_msg 0 || true
85 else
86 log_end_msg 1 || true
87 fi
88 ;;
89 stop)
90 log_daemon_msg "Stopping OpenBSD Secure Shell server" "sshd" || true
91 if start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid; then
92 log_end_msg 0 || true
93 else
94 log_end_msg 1 || true
95 fi
96 ;;
97
98 reload|force-reload)
99 check_for_no_start
100 check_config
101 log_daemon_msg "Reloading OpenBSD Secure Shell server's configuration" "sshd" || true
102 if start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd; then
103 log_end_msg 0 || true
104 else
105 log_end_msg 1 || true
106 fi
107 ;;
108
109 restart)
110 check_privsep_dir
111 check_config
112 log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true
113 start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /run/sshd.pid
114 check_for_no_start log_end_msg
115 check_dev_null log_end_msg
116 if start-stop-daemon --start --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then
117 log_end_msg 0 || true
118 else
119 log_end_msg 1 || true
120 fi
121 ;;
122
123 try-restart)
124 check_privsep_dir
125 check_config
126 log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true
127 RET=0
128 start-stop-daemon --stop --quiet --retry 30 --pidfile /run/sshd.pid || RET="$?"
129 case $RET in
130 0)
131 # old daemon stopped
132 check_for_no_start log_end_msg
133 check_dev_null log_end_msg
134 if start-stop-daemon --start --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then
135 log_end_msg 0 || true
136 else
137 log_end_msg 1 || true
138 fi
139 ;;
140 1)
141 # daemon not running
142 log_progress_msg "(not running)" || true
143 log_end_msg 0 || true
144 ;;
145 *)
146 # failed to stop
147 log_progress_msg "(failed to stop)" || true
148 log_end_msg 1 || true
149 ;;
150 esac
151 ;;
152
153 status)
154 status_of_proc -p /run/sshd.pid /usr/sbin/sshd sshd && exit 0 || exit $?
155 ;;
156
157 *)
158 log_action_msg "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}" || true
159 exit 1
160esac
161
162exit 0
diff --git a/debian/openssh-server.ssh.service b/debian/openssh-server.ssh.service
new file mode 120000
index 000000000..609457230
--- /dev/null
+++ b/debian/openssh-server.ssh.service
@@ -0,0 +1 @@
systemd/ssh.service \ No newline at end of file
diff --git a/debian/openssh-server.sshd.pam.in b/debian/openssh-server.sshd.pam.in
new file mode 100644
index 000000000..2cad67da6
--- /dev/null
+++ b/debian/openssh-server.sshd.pam.in
@@ -0,0 +1,55 @@
1# PAM configuration for the Secure Shell service
2
3# Standard Un*x authentication.
4@include common-auth
5
6# Disallow non-root logins when /etc/nologin exists.
7account required pam_nologin.so
8
9# Uncomment and edit /etc/security/access.conf if you need to set complex
10# access limits that are hard to express in sshd_config.
11# account required pam_access.so
12
13# Standard Un*x authorization.
14@include common-account
15
16# SELinux needs to be the first session rule. This ensures that any
17# lingering context has been cleared. Without this it is possible that a
18# module could execute code in the wrong domain.
19session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
20
21# Set the loginuid process attribute.
22session required pam_loginuid.so
23
24@IF_KEYINIT@# Create a new session keyring.
25@IF_KEYINIT@session optional pam_keyinit.so force revoke
26
27# Standard Un*x session setup and teardown.
28@include common-session
29
30# Print the message of the day upon successful login.
31# This includes a dynamically generated part from /run/motd.dynamic
32# and a static (admin-editable) part from /etc/motd.
33session optional pam_motd.so motd=/run/motd.dynamic
34session optional pam_motd.so noupdate
35
36# Print the status of the user's mailbox upon successful login.
37session optional pam_mail.so standard noenv # [1]
38
39# Set up user limits from /etc/security/limits.conf.
40session required pam_limits.so
41
42# Read environment variables from /etc/environment and
43# /etc/security/pam_env.conf.
44session required pam_env.so # [1]
45# In Debian 4.0 (etch), locale-related environment variables were moved to
46# /etc/default/locale, so read that as well.
47session required pam_env.so user_readenv=1 envfile=/etc/default/locale
48
49# SELinux needs to intervene at login time to ensure that the process starts
50# in the proper default security context. Only sessions which are intended
51# to run in the user's context should be run after this.
52session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
53
54# Standard Un*x password updating.
55@include common-password
diff --git a/debian/openssh-server.templates b/debian/openssh-server.templates
new file mode 100644
index 000000000..e071fe3b8
--- /dev/null
+++ b/debian/openssh-server.templates
@@ -0,0 +1,23 @@
1Template: openssh-server/permit-root-login
2Type: boolean
3Default: true
4_Description: Disable SSH password authentication for root?
5 Previous versions of openssh-server permitted logging in as root over SSH
6 using password authentication. The default for new installations is now
7 "PermitRootLogin prohibit-password", which disables password authentication
8 for root without breaking systems that have explicitly configured SSH
9 public key authentication for root.
10 .
11 This change makes systems more secure against brute-force password
12 dictionary attacks on the root user (a very common target for such
13 attacks). However, it may break systems that are set up with the
14 expectation of being able to SSH as root using password authentication. You
15 should only make this change if you do not need to do that.
16
17Template: openssh-server/password-authentication
18Type: boolean
19Default: true
20Description: Allow password authentication?
21 By default, the SSH server will allow authenticating using a password.
22 You may want to change this if all users on this system authenticate using
23 a stronger authentication method, such as public keys.
diff --git a/debian/openssh-server.ucf-md5sum b/debian/openssh-server.ucf-md5sum
new file mode 100644
index 000000000..c9c89d429
--- /dev/null
+++ b/debian/openssh-server.ucf-md5sum
@@ -0,0 +1,48 @@
1# Historical md5sums of the default /etc/ssh/sshd_config up to and including
2# 1:7.3p1-5.
30d06fc337cee10609d4833dc88df740f
410dc68360f6658910a98a051273de22c
511f9e107b4d13bbcabe7f8e8da734371
616c827adcff44efaca05ec5eea6383d7
72eeff28468576c3f2e538314e177687b
8386c8b9079625b78f6d624ae506958ae
938fc7b31b3e3078848f0eec457d3e050
10395c5e13801f9b4f17c2cb54aa634fbd
11423d5796cee663af2d0f24c4d520b578
1242be2cb5b64bc91443b2e46969d2d539
1342cd8b7c5ea9e440d3efa50b9a1bb444
144f56ca8d0b5dfdaeb732becd3292ce5d
1554998a682a97af8449e9de0316eacf1d
165c0bdc1735accbdc062381149937ec4a
176357b54acf8e089c57544e06d1bbec53
186a621d8bc448987e5a8a613c40307a4c
19702a79962e60aa17c6d3df742e8ec670
207a69eff91ec92b4e065b8dd8846366b2
217c60e22f183b6219c684f15ce24153fd
228304e780c43d4a606f695c8965f48299
238b9e70ee87f4b822714e2ed7af5b70dc
248caefdd9e251b7cc1baa37874149a870
2590baeb1c778464d2da610f8268939719
26962a382e51f43f80109131838ca326ba
2796eaf22faba705a37905282f6ad69d64
289cb6cd83be1c21f73476be629b163c01
29a07a9865cd33b85a1426cd67954c6fa0
30ae1e844b43986e2a964cf84f46b50c5b
31b516afa5a1e298f4cd00952b36dd623f
32b69fc974ee9b5a111bd473ef54cdd232
33ba9c3f808c811d6f944ad10a508c4767
34bccf9af9c7027afd0895d8ff8e02761a
35bd3a2b95f8b4b180eed707794ad81e4d
36c34586b56496f81a10615c002685fc74
37c47555a21189a6b703d2c5d37d2c50ed
38cac079e87c0ae0d77eafc9b285e36348
39d224f92823483333432974f63cb6dc66
40d50ef9ef2aa51cb9f808f6a776260c0a
41e0029e1e9871d4d2b673ee6d70a38614
42e086e7eb521ccc5776371b2e198f0702
43e101f74dc7381527e9aefa1f78b01a7f
44e24f749808133a27d94fda84a89bb27b
45ec16c3dd0203f13885d74ce529719fda
46efcff5380823d4e3f5039620c2e08459
47f58056370a64dbd2017d7486421c281d
48fe396d52df77f1fbf710591d4dbf3311
diff --git a/debian/openssh-server.ufw.profile b/debian/openssh-server.ufw.profile
new file mode 100644
index 000000000..9bbe906bc
--- /dev/null
+++ b/debian/openssh-server.ufw.profile
@@ -0,0 +1,4 @@
1[OpenSSH]
2title=Secure shell server, an rshd replacement
3description=OpenSSH is a free implementation of the Secure Shell protocol.
4ports=22/tcp
diff --git a/debian/openssh-sftp-server.install b/debian/openssh-sftp-server.install
new file mode 100644
index 000000000..25b12dc09
--- /dev/null
+++ b/debian/openssh-sftp-server.install
@@ -0,0 +1,2 @@
1usr/lib/openssh/sftp-server
2usr/share/man/man8/sftp-server.8
diff --git a/debian/openssh-sftp-server.links b/debian/openssh-sftp-server.links
new file mode 100644
index 000000000..2d98b1dcb
--- /dev/null
+++ b/debian/openssh-sftp-server.links
@@ -0,0 +1 @@
usr/lib/openssh/sftp-server usr/lib/sftp-server
diff --git a/debian/patches/authorized-keys-man-symlink.patch b/debian/patches/authorized-keys-man-symlink.patch
new file mode 100644
index 000000000..239c36f78
--- /dev/null
+++ b/debian/patches/authorized-keys-man-symlink.patch
@@ -0,0 +1,26 @@
1From 66488db1ed04b4ca150ec530ed212fa46a653c1a Mon Sep 17 00:00:00 2001
2From: Tomas Pospisek <tpo_deb@sourcepole.ch>
3Date: Sun, 9 Feb 2014 16:10:07 +0000
4Subject: Install authorized_keys(5) as a symlink to sshd(8)
5
6Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1720
7Bug-Debian: http://bugs.debian.org/441817
8Last-Update: 2013-09-14
9
10Patch-Name: authorized-keys-man-symlink.patch
11---
12 Makefile.in | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/Makefile.in b/Makefile.in
16index 6f3f042b..1afb4f79 100644
17--- a/Makefile.in
18+++ b/Makefile.in
19@@ -352,6 +352,7 @@ install-files:
20 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
21 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
22 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
23+ ln -s ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5
24 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
25 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
26 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
diff --git a/debian/patches/debian-banner.patch b/debian/patches/debian-banner.patch
new file mode 100644
index 000000000..b1338d2c7
--- /dev/null
+++ b/debian/patches/debian-banner.patch
@@ -0,0 +1,111 @@
1From 9ec4db016a0510c449f9cefeb3299c2e755698c7 Mon Sep 17 00:00:00 2001
2From: Kees Cook <kees@debian.org>
3Date: Sun, 9 Feb 2014 16:10:06 +0000
4Subject: Add DebianBanner server configuration option
5
6Setting this to "no" causes sshd to omit the Debian revision from its
7initial protocol handshake, for those scared by package-versioning.patch.
8
9Bug-Debian: http://bugs.debian.org/562048
10Forwarded: not-needed
11Last-Update: 2018-04-03
12
13Patch-Name: debian-banner.patch
14---
15 servconf.c | 9 +++++++++
16 servconf.h | 2 ++
17 sshd.c | 3 ++-
18 sshd_config.5 | 5 +++++
19 4 files changed, 18 insertions(+), 1 deletion(-)
20
21diff --git a/servconf.c b/servconf.c
22index 3fff3d53..0a8f6fd6 100644
23--- a/servconf.c
24+++ b/servconf.c
25@@ -177,6 +177,7 @@ initialize_server_options(ServerOptions *options)
26 options->fingerprint_hash = -1;
27 options->disable_forwarding = -1;
28 options->expose_userauth_info = -1;
29+ options->debian_banner = -1;
30 }
31
32 /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */
33@@ -393,6 +394,8 @@ fill_default_server_options(ServerOptions *options)
34 options->disable_forwarding = 0;
35 if (options->expose_userauth_info == -1)
36 options->expose_userauth_info = 0;
37+ if (options->debian_banner == -1)
38+ options->debian_banner = 1;
39
40 assemble_algorithms(options);
41
42@@ -480,6 +483,7 @@ typedef enum {
43 sStreamLocalBindMask, sStreamLocalBindUnlink,
44 sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding,
45 sExposeAuthInfo, sRDomain,
46+ sDebianBanner,
47 sDeprecated, sIgnore, sUnsupported
48 } ServerOpCodes;
49
50@@ -634,6 +638,7 @@ static struct {
51 { "disableforwarding", sDisableForwarding, SSHCFG_ALL },
52 { "exposeauthinfo", sExposeAuthInfo, SSHCFG_ALL },
53 { "rdomain", sRDomain, SSHCFG_ALL },
54+ { "debianbanner", sDebianBanner, SSHCFG_GLOBAL },
55 { NULL, sBadOption, 0 }
56 };
57
58@@ -2056,6 +2061,10 @@ process_server_config_line(ServerOptions *options, char *line,
59 *charptr = xstrdup(arg);
60 break;
61
62+ case sDebianBanner:
63+ intptr = &options->debian_banner;
64+ goto parse_flag;
65+
66 case sDeprecated:
67 case sIgnore:
68 case sUnsupported:
69diff --git a/servconf.h b/servconf.h
70index 5dfc9bc0..b0fa7045 100644
71--- a/servconf.h
72+++ b/servconf.h
73@@ -211,6 +211,8 @@ typedef struct {
74
75 int fingerprint_hash;
76 int expose_userauth_info;
77+
78+ int debian_banner;
79 } ServerOptions;
80
81 /* Information about the incoming connection as used by Match */
82diff --git a/sshd.c b/sshd.c
83index 9a7f5495..1d645a17 100644
84--- a/sshd.c
85+++ b/sshd.c
86@@ -384,7 +384,8 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out)
87 char remote_version[256]; /* Must be at least as big as buf. */
88
89 xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s\r\n",
90- PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE,
91+ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2,
92+ options.debian_banner ? SSH_RELEASE : SSH_RELEASE_MINIMUM,
93 *options.version_addendum == '\0' ? "" : " ",
94 options.version_addendum);
95
96diff --git a/sshd_config.5 b/sshd_config.5
97index 1a1c6dd0..45044a70 100644
98--- a/sshd_config.5
99+++ b/sshd_config.5
100@@ -531,6 +531,11 @@ or
101 .Cm no .
102 The default is
103 .Cm yes .
104+.It Cm DebianBanner
105+Specifies whether the distribution-specified extra version suffix is
106+included during initial protocol handshake.
107+The default is
108+.Cm yes .
109 .It Cm DenyGroups
110 This keyword can be followed by a list of group name patterns, separated
111 by spaces.
diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch
new file mode 100644
index 000000000..ebf5d23bc
--- /dev/null
+++ b/debian/patches/debian-config.patch
@@ -0,0 +1,238 @@
1From e8e09061f8168f6f105f56fca10b6cd61b9f587a Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:18 +0000
4Subject: Various Debian-specific configuration changes
5
6ssh: Enable ForwardX11Trusted, returning to earlier semantics which cause
7fewer problems with existing setups (http://bugs.debian.org/237021).
8
9ssh: Set 'SendEnv LANG LC_*' by default (http://bugs.debian.org/264024).
10
11ssh: Enable HashKnownHosts by default to try to limit the spread of ssh
12worms.
13
14ssh: Enable GSSAPIAuthentication by default.
15
16sshd: Enable PAM, disable ChallengeResponseAuthentication, and disable
17PrintMotd.
18
19sshd: Enable X11Forwarding.
20
21sshd: Set 'AcceptEnv LANG LC_*' by default.
22
23sshd: Change sftp subsystem path to /usr/lib/openssh/sftp-server.
24
25Document all of this.
26
27Author: Russ Allbery <rra@debian.org>
28Forwarded: not-needed
29Last-Update: 2017-10-04
30
31Patch-Name: debian-config.patch
32---
33 readconf.c | 2 +-
34 ssh.1 | 21 +++++++++++++++++++++
35 ssh_config | 6 +++++-
36 ssh_config.5 | 19 ++++++++++++++++++-
37 sshd_config | 16 ++++++++++------
38 sshd_config.5 | 22 ++++++++++++++++++++++
39 6 files changed, 77 insertions(+), 9 deletions(-)
40
41diff --git a/readconf.c b/readconf.c
42index 50349e23..efcf2d62 100644
43--- a/readconf.c
44+++ b/readconf.c
45@@ -1916,7 +1916,7 @@ fill_default_options(Options * options)
46 if (options->forward_x11 == -1)
47 options->forward_x11 = 0;
48 if (options->forward_x11_trusted == -1)
49- options->forward_x11_trusted = 0;
50+ options->forward_x11_trusted = 1;
51 if (options->forward_x11_timeout == -1)
52 options->forward_x11_timeout = 1200;
53 /*
54diff --git a/ssh.1 b/ssh.1
55index f8fc26d2..8a03db95 100644
56--- a/ssh.1
57+++ b/ssh.1
58@@ -768,6 +768,16 @@ directive in
59 .Xr ssh_config 5
60 for more information.
61 .Pp
62+(Debian-specific: X11 forwarding is not subjected to X11 SECURITY extension
63+restrictions by default, because too many programs currently crash in this
64+mode.
65+Set the
66+.Cm ForwardX11Trusted
67+option to
68+.Dq no
69+to restore the upstream behaviour.
70+This may change in future depending on client-side improvements.)
71+.Pp
72 .It Fl x
73 Disables X11 forwarding.
74 .Pp
75@@ -776,6 +786,17 @@ Enables trusted X11 forwarding.
76 Trusted X11 forwardings are not subjected to the X11 SECURITY extension
77 controls.
78 .Pp
79+(Debian-specific: This option does nothing in the default configuration: it
80+is equivalent to
81+.Dq Cm ForwardX11Trusted No yes ,
82+which is the default as described above.
83+Set the
84+.Cm ForwardX11Trusted
85+option to
86+.Dq no
87+to restore the upstream behaviour.
88+This may change in future depending on client-side improvements.)
89+.Pp
90 .It Fl y
91 Send log information using the
92 .Xr syslog 3
93diff --git a/ssh_config b/ssh_config
94index bcb9f153..1b676fb2 100644
95--- a/ssh_config
96+++ b/ssh_config
97@@ -17,9 +17,10 @@
98 # list of available options, their meanings and defaults, please see the
99 # ssh_config(5) man page.
100
101-# Host *
102+Host *
103 # ForwardAgent no
104 # ForwardX11 no
105+# ForwardX11Trusted yes
106 # PasswordAuthentication yes
107 # HostbasedAuthentication no
108 # GSSAPIAuthentication no
109@@ -46,3 +47,6 @@
110 # VisualHostKey no
111 # ProxyCommand ssh -q -W %h:%p gateway.example.com
112 # RekeyLimit 1G 1h
113+ SendEnv LANG LC_*
114+ HashKnownHosts yes
115+ GSSAPIAuthentication yes
116diff --git a/ssh_config.5 b/ssh_config.5
117index ca052884..ed6e5d02 100644
118--- a/ssh_config.5
119+++ b/ssh_config.5
120@@ -71,6 +71,22 @@ Since the first obtained value for each parameter is used, more
121 host-specific declarations should be given near the beginning of the
122 file, and general defaults at the end.
123 .Pp
124+Note that the Debian
125+.Ic openssh-client
126+package sets several options as standard in
127+.Pa /etc/ssh/ssh_config
128+which are not the default in
129+.Xr ssh 1 :
130+.Pp
131+.Bl -bullet -offset indent -compact
132+.It
133+.Cm SendEnv No LANG LC_*
134+.It
135+.Cm HashKnownHosts No yes
136+.It
137+.Cm GSSAPIAuthentication No yes
138+.El
139+.Pp
140 The file contains keyword-argument pairs, one per line.
141 Lines starting with
142 .Ql #
143@@ -690,11 +706,12 @@ elapsed.
144 .It Cm ForwardX11Trusted
145 If this option is set to
146 .Cm yes ,
147+(the Debian-specific default),
148 remote X11 clients will have full access to the original X11 display.
149 .Pp
150 If this option is set to
151 .Cm no
152-(the default),
153+(the upstream default),
154 remote X11 clients will be considered untrusted and prevented
155 from stealing or tampering with data belonging to trusted X11
156 clients.
157diff --git a/sshd_config b/sshd_config
158index 86263d71..de9cc9fe 100644
159--- a/sshd_config
160+++ b/sshd_config
161@@ -57,8 +57,9 @@ AuthorizedKeysFile .ssh/authorized_keys
162 #PasswordAuthentication yes
163 #PermitEmptyPasswords no
164
165-# Change to no to disable s/key passwords
166-#ChallengeResponseAuthentication yes
167+# Change to yes to enable challenge-response passwords (beware issues with
168+# some PAM modules and threads)
169+ChallengeResponseAuthentication no
170
171 # Kerberos options
172 #KerberosAuthentication no
173@@ -81,16 +82,16 @@ AuthorizedKeysFile .ssh/authorized_keys
174 # If you just want the PAM account and session checks to run without
175 # PAM authentication, then enable this but set PasswordAuthentication
176 # and ChallengeResponseAuthentication to 'no'.
177-#UsePAM no
178+UsePAM yes
179
180 #AllowAgentForwarding yes
181 #AllowTcpForwarding yes
182 #GatewayPorts no
183-#X11Forwarding no
184+X11Forwarding yes
185 #X11DisplayOffset 10
186 #X11UseLocalhost yes
187 #PermitTTY yes
188-#PrintMotd yes
189+PrintMotd no
190 #PrintLastLog yes
191 #TCPKeepAlive yes
192 #UseLogin no
193@@ -108,8 +109,11 @@ AuthorizedKeysFile .ssh/authorized_keys
194 # no default banner path
195 #Banner none
196
197+# Allow client to pass locale environment variables
198+AcceptEnv LANG LC_*
199+
200 # override default of no subsystems
201-Subsystem sftp /usr/libexec/sftp-server
202+Subsystem sftp /usr/lib/openssh/sftp-server
203
204 # Example of overriding settings on a per-user basis
205 #Match User anoncvs
206diff --git a/sshd_config.5 b/sshd_config.5
207index 44b91846..4c7ee425 100644
208--- a/sshd_config.5
209+++ b/sshd_config.5
210@@ -56,6 +56,28 @@ Arguments may optionally be enclosed in double quotes
211 .Pq \&"
212 in order to represent arguments containing spaces.
213 .Pp
214+Note that the Debian
215+.Ic openssh-server
216+package sets several options as standard in
217+.Pa /etc/ssh/sshd_config
218+which are not the default in
219+.Xr sshd 8 :
220+.Pp
221+.Bl -bullet -offset indent -compact
222+.It
223+.Cm ChallengeResponseAuthentication No no
224+.It
225+.Cm X11Forwarding No yes
226+.It
227+.Cm PrintMotd No no
228+.It
229+.Cm AcceptEnv No LANG LC_*
230+.It
231+.Cm Subsystem No sftp /usr/lib/openssh/sftp-server
232+.It
233+.Cm UsePAM No yes
234+.El
235+.Pp
236 The possible
237 keywords and their meanings are as follows (note that
238 keywords are case-insensitive and arguments are case-sensitive):
diff --git a/debian/patches/dnssec-sshfp.patch b/debian/patches/dnssec-sshfp.patch
new file mode 100644
index 000000000..0ba825f4e
--- /dev/null
+++ b/debian/patches/dnssec-sshfp.patch
@@ -0,0 +1,94 @@
1From 8c11a03efd47de883b52838735d6890ca8d4d9f8 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:01 +0000
4Subject: Force use of DNSSEC even if "options edns0" isn't in resolv.conf
5
6This allows SSHFP DNS records to be verified if glibc 2.11 is installed.
7
8Origin: vendor, https://cvs.fedoraproject.org/viewvc/F-12/openssh/openssh-5.2p1-edns.patch?revision=1.1&view=markup
9Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572049
10Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572049
11Last-Update: 2010-04-06
12
13Patch-Name: dnssec-sshfp.patch
14---
15 dns.c | 14 +++++++++++++-
16 openbsd-compat/getrrsetbyname.c | 10 +++++-----
17 openbsd-compat/getrrsetbyname.h | 3 +++
18 3 files changed, 21 insertions(+), 6 deletions(-)
19
20diff --git a/dns.c b/dns.c
21index ff1a2c41..82ec9719 100644
22--- a/dns.c
23+++ b/dns.c
24@@ -211,6 +211,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
25 {
26 u_int counter;
27 int result;
28+ unsigned int rrset_flags = 0;
29 struct rrsetinfo *fingerprints = NULL;
30
31 u_int8_t hostkey_algorithm;
32@@ -234,8 +235,19 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address,
33 return -1;
34 }
35
36+ /*
37+ * Original getrrsetbyname function, found on OpenBSD for example,
38+ * doesn't accept any flag and prerequisite for obtaining AD bit in
39+ * DNS response is set by "options edns0" in resolv.conf.
40+ *
41+ * Our version is more clever and use RRSET_FORCE_EDNS0 flag.
42+ */
43+#ifndef HAVE_GETRRSETBYNAME
44+ rrset_flags |= RRSET_FORCE_EDNS0;
45+#endif
46 result = getrrsetbyname(hostname, DNS_RDATACLASS_IN,
47- DNS_RDATATYPE_SSHFP, 0, &fingerprints);
48+ DNS_RDATATYPE_SSHFP, rrset_flags, &fingerprints);
49+
50 if (result) {
51 verbose("DNS lookup error: %s", dns_result_totext(result));
52 return -1;
53diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
54index dc6fe053..e061a290 100644
55--- a/openbsd-compat/getrrsetbyname.c
56+++ b/openbsd-compat/getrrsetbyname.c
57@@ -209,8 +209,8 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
58 goto fail;
59 }
60
61- /* don't allow flags yet, unimplemented */
62- if (flags) {
63+ /* Allow RRSET_FORCE_EDNS0 flag only. */
64+ if ((flags & !RRSET_FORCE_EDNS0) != 0) {
65 result = ERRSET_INVAL;
66 goto fail;
67 }
68@@ -226,9 +226,9 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
69 #endif /* DEBUG */
70
71 #ifdef RES_USE_DNSSEC
72- /* turn on DNSSEC if EDNS0 is configured */
73- if (_resp->options & RES_USE_EDNS0)
74- _resp->options |= RES_USE_DNSSEC;
75+ /* turn on DNSSEC if required */
76+ if (flags & RRSET_FORCE_EDNS0)
77+ _resp->options |= (RES_USE_EDNS0|RES_USE_DNSSEC);
78 #endif /* RES_USE_DNSEC */
79
80 /* make query */
81diff --git a/openbsd-compat/getrrsetbyname.h b/openbsd-compat/getrrsetbyname.h
82index 1283f550..dbbc85a2 100644
83--- a/openbsd-compat/getrrsetbyname.h
84+++ b/openbsd-compat/getrrsetbyname.h
85@@ -72,6 +72,9 @@
86 #ifndef RRSET_VALIDATED
87 # define RRSET_VALIDATED 1
88 #endif
89+#ifndef RRSET_FORCE_EDNS0
90+# define RRSET_FORCE_EDNS0 0x0001
91+#endif
92
93 /*
94 * Return codes for getrrsetbyname()
diff --git a/debian/patches/doc-hash-tab-completion.patch b/debian/patches/doc-hash-tab-completion.patch
new file mode 100644
index 000000000..86f3a1fc4
--- /dev/null
+++ b/debian/patches/doc-hash-tab-completion.patch
@@ -0,0 +1,28 @@
1From 6765f629a8f5416b133d26e023a201193c33d8b5 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:11 +0000
4Subject: Document that HashKnownHosts may break tab-completion
5
6Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1727
7Bug-Debian: http://bugs.debian.org/430154
8Last-Update: 2013-09-14
9
10Patch-Name: doc-hash-tab-completion.patch
11---
12 ssh_config.5 | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/ssh_config.5 b/ssh_config.5
16index 84dcd52c..ca052884 100644
17--- a/ssh_config.5
18+++ b/ssh_config.5
19@@ -784,6 +784,9 @@ Note that existing names and addresses in known hosts files
20 will not be converted automatically,
21 but may be manually hashed using
22 .Xr ssh-keygen 1 .
23+Use of this option may break facilities such as tab-completion that rely
24+on being able to read unhashed host names from
25+.Pa ~/.ssh/known_hosts .
26 .It Cm HostbasedAuthentication
27 Specifies whether to try rhosts based authentication with public key
28 authentication.
diff --git a/debian/patches/gnome-ssh-askpass2-icon.patch b/debian/patches/gnome-ssh-askpass2-icon.patch
new file mode 100644
index 000000000..2959854e4
--- /dev/null
+++ b/debian/patches/gnome-ssh-askpass2-icon.patch
@@ -0,0 +1,26 @@
1From 4ccb07d2ebea1b01b56a455790224ce97a0b36e8 Mon Sep 17 00:00:00 2001
2From: Vincent Untz <vuntz@ubuntu.com>
3Date: Sun, 9 Feb 2014 16:10:16 +0000
4Subject: Give the ssh-askpass-gnome window a default icon
5
6Bug-Ubuntu: https://bugs.launchpad.net/bugs/27152
7Last-Update: 2010-02-28
8
9Patch-Name: gnome-ssh-askpass2-icon.patch
10---
11 contrib/gnome-ssh-askpass2.c | 2 ++
12 1 file changed, 2 insertions(+)
13
14diff --git a/contrib/gnome-ssh-askpass2.c b/contrib/gnome-ssh-askpass2.c
15index 535a6927..e37a1338 100644
16--- a/contrib/gnome-ssh-askpass2.c
17+++ b/contrib/gnome-ssh-askpass2.c
18@@ -211,6 +211,8 @@ main(int argc, char **argv)
19
20 gtk_init(&argc, &argv);
21
22+ gtk_window_set_default_icon_from_file ("/usr/share/pixmaps/ssh-askpass-gnome.png", NULL);
23+
24 if (argc > 1) {
25 message = g_strjoinv(" ", argv + 1);
26 } else {
diff --git a/debian/patches/gssapi.patch b/debian/patches/gssapi.patch
new file mode 100644
index 000000000..a67ebced0
--- /dev/null
+++ b/debian/patches/gssapi.patch
@@ -0,0 +1,3300 @@
1From cb427e23bf78d65407c78d868c4ef525dbfaa68f Mon Sep 17 00:00:00 2001
2From: Simon Wilkinson <simon@sxw.org.uk>
3Date: Sun, 9 Feb 2014 16:09:48 +0000
4Subject: GSSAPI key exchange support
5
6This patch has been rejected upstream: "None of the OpenSSH developers are
7in favour of adding this, and this situation has not changed for several
8years. This is not a slight on Simon's patch, which is of fine quality, but
9just that a) we don't trust GSSAPI implementations that much and b) we don't
10like adding new KEX since they are pre-auth attack surface. This one is
11particularly scary, since it requires hooks out to typically root-owned
12system resources."
13
14However, quite a lot of people rely on this in Debian, and it's better to
15have it merged into the main openssh package rather than having separate
16-krb5 packages (as we used to have). It seems to have a generally good
17security history.
18
19Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1242
20Last-Updated: 2017-10-04
21
22Patch-Name: gssapi.patch
23---
24 ChangeLog.gssapi | 113 +++++++++++++++++++
25 Makefile.in | 3 +-
26 auth-krb5.c | 17 ++-
27 auth.c | 96 +---------------
28 auth2-gss.c | 49 +++++++-
29 auth2.c | 2 +
30 canohost.c | 93 +++++++++++++++
31 canohost.h | 3 +
32 clientloop.c | 15 ++-
33 config.h.in | 6 +
34 configure.ac | 24 ++++
35 gss-genr.c | 275 +++++++++++++++++++++++++++++++++++++++++++-
36 gss-serv-krb5.c | 85 ++++++++++++--
37 gss-serv.c | 184 +++++++++++++++++++++++++++---
38 kex.c | 19 ++++
39 kex.h | 14 +++
40 kexgssc.c | 338 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
41 kexgsss.c | 295 ++++++++++++++++++++++++++++++++++++++++++++++++
42 monitor.c | 115 +++++++++++++++++--
43 monitor.h | 3 +
44 monitor_wrap.c | 47 +++++++-
45 monitor_wrap.h | 4 +-
46 readconf.c | 43 +++++++
47 readconf.h | 5 +
48 servconf.c | 26 +++++
49 servconf.h | 2 +
50 ssh-gss.h | 41 ++++++-
51 ssh_config | 2 +
52 ssh_config.5 | 32 ++++++
53 sshconnect2.c | 131 ++++++++++++++++++++-
54 sshd.c | 112 +++++++++++++++++-
55 sshd_config | 2 +
56 sshd_config.5 | 10 ++
57 sshkey.c | 3 +-
58 sshkey.h | 1 +
59 35 files changed, 2063 insertions(+), 147 deletions(-)
60 create mode 100644 ChangeLog.gssapi
61 create mode 100644 kexgssc.c
62 create mode 100644 kexgsss.c
63
64diff --git a/ChangeLog.gssapi b/ChangeLog.gssapi
65new file mode 100644
66index 00000000..f117a336
67--- /dev/null
68+++ b/ChangeLog.gssapi
69@@ -0,0 +1,113 @@
70+20110101
71+ - Finally update for OpenSSH 5.6p1
72+ - Add GSSAPIServerIdentity option from Jim Basney
73+
74+20100308
75+ - [ Makefile.in, key.c, key.h ]
76+ Updates for OpenSSH 5.4p1
77+ - [ servconf.c ]
78+ Include GSSAPI options in the sshd -T configuration dump, and flag
79+ some older configuration options as being unsupported. Thanks to Colin
80+ Watson.
81+ -
82+
83+20100124
84+ - [ sshconnect2.c ]
85+ Adapt to deal with additional element in Authmethod structure. Thanks to
86+ Colin Watson
87+
88+20090615
89+ - [ gss-genr.c gss-serv.c kexgssc.c kexgsss.c monitor.c sshconnect2.c
90+ sshd.c ]
91+ Fix issues identified by Greg Hudson following a code review
92+ Check return value of gss_indicate_mechs
93+ Protect GSSAPI calls in monitor, so they can only be used if enabled
94+ Check return values of bignum functions in key exchange
95+ Use BN_clear_free to clear other side's DH value
96+ Make ssh_gssapi_id_kex more robust
97+ Only configure kex table pointers if GSSAPI is enabled
98+ Don't leak mechanism list, or gss mechanism list
99+ Cast data.length before printing
100+ If serverkey isn't provided, use an empty string, rather than NULL
101+
102+20090201
103+ - [ gss-genr.c gss-serv.c kex.h kexgssc.c readconf.c readconf.h ssh-gss.h
104+ ssh_config.5 sshconnet2.c ]
105+ Add support for the GSSAPIClientIdentity option, which allows the user
106+ to specify which GSSAPI identity to use to contact a given server
107+
108+20080404
109+ - [ gss-serv.c ]
110+ Add code to actually implement GSSAPIStrictAcceptCheck, which had somehow
111+ been omitted from a previous version of this patch. Reported by Borislav
112+ Stoichkov
113+
114+20070317
115+ - [ gss-serv-krb5.c ]
116+ Remove C99ism, where new_ccname was being declared in the middle of a
117+ function
118+
119+20061220
120+ - [ servconf.c ]
121+ Make default for GSSAPIStrictAcceptorCheck be Yes, to match previous, and
122+ documented, behaviour. Reported by Dan Watson.
123+
124+20060910
125+ - [ gss-genr.c kexgssc.c kexgsss.c kex.h monitor.c sshconnect2.c sshd.c
126+ ssh-gss.h ]
127+ add support for gss-group14-sha1 key exchange mechanisms
128+ - [ gss-serv.c servconf.c servconf.h sshd_config sshd_config.5 ]
129+ Add GSSAPIStrictAcceptorCheck option to allow the disabling of
130+ acceptor principal checking on multi-homed machines.
131+ <Bugzilla #928>
132+ - [ sshd_config ssh_config ]
133+ Add settings for GSSAPIKeyExchange and GSSAPITrustDNS to the sample
134+ configuration files
135+ - [ kexgss.c kegsss.c sshconnect2.c sshd.c ]
136+ Code cleanup. Replace strlen/xmalloc/snprintf sequences with xasprintf()
137+ Limit length of error messages displayed by client
138+
139+20060909
140+ - [ gss-genr.c gss-serv.c ]
141+ move ssh_gssapi_acquire_cred() and ssh_gssapi_server_ctx to be server
142+ only, where they belong
143+ <Bugzilla #1225>
144+
145+20060829
146+ - [ gss-serv-krb5.c ]
147+ Fix CCAPI credentials cache name when creating KRB5CCNAME environment
148+ variable
149+
150+20060828
151+ - [ gss-genr.c ]
152+ Avoid Heimdal context freeing problem
153+ <Fixed upstream 20060829>
154+
155+20060818
156+ - [ gss-genr.c ssh-gss.h sshconnect2.c ]
157+ Make sure that SPENGO is disabled
158+ <Bugzilla #1218 - Fixed upstream 20060818>
159+
160+20060421
161+ - [ gssgenr.c, sshconnect2.c ]
162+ a few type changes (signed versus unsigned, int versus size_t) to
163+ fix compiler errors/warnings
164+ (from jbasney AT ncsa.uiuc.edu)
165+ - [ kexgssc.c, sshconnect2.c ]
166+ fix uninitialized variable warnings
167+ (from jbasney AT ncsa.uiuc.edu)
168+ - [ gssgenr.c ]
169+ pass oid to gss_display_status (helpful when using GSSAPI mechglue)
170+ (from jbasney AT ncsa.uiuc.edu)
171+ <Bugzilla #1220 >
172+ - [ gss-serv-krb5.c ]
173+ #ifdef HAVE_GSSAPI_KRB5 should be #ifdef HAVE_GSSAPI_KRB5_H
174+ (from jbasney AT ncsa.uiuc.edu)
175+ <Fixed upstream 20060304>
176+ - [ readconf.c, readconf.h, ssh_config.5, sshconnect2.c
177+ add client-side GssapiKeyExchange option
178+ (from jbasney AT ncsa.uiuc.edu)
179+ - [ sshconnect2.c ]
180+ add support for GssapiTrustDns option for gssapi-with-mic
181+ (from jbasney AT ncsa.uiuc.edu)
182+ <gssapi-with-mic support is Bugzilla #1008>
183diff --git a/Makefile.in b/Makefile.in
184index 04e1c8e5..6f3f042b 100644
185--- a/Makefile.in
186+++ b/Makefile.in
187@@ -100,6 +100,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
188 kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
189 kexdhc.o kexgexc.o kexecdhc.o kexc25519c.o \
190 kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o \
191+ kexgssc.o \
192 platform-pledge.o platform-tracing.o platform-misc.o
193
194 SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
195@@ -113,7 +114,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o \
196 auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
197 auth2-none.o auth2-passwd.o auth2-pubkey.o \
198 monitor.o monitor_wrap.o auth-krb5.o \
199- auth2-gss.o gss-serv.o gss-serv-krb5.o \
200+ auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o \
201 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
202 sftp-server.o sftp-common.o \
203 sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \
204diff --git a/auth-krb5.c b/auth-krb5.c
205index a5a81ed2..38e7fee2 100644
206--- a/auth-krb5.c
207+++ b/auth-krb5.c
208@@ -182,8 +182,13 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
209
210 len = strlen(authctxt->krb5_ticket_file) + 6;
211 authctxt->krb5_ccname = xmalloc(len);
212+#ifdef USE_CCAPI
213+ snprintf(authctxt->krb5_ccname, len, "API:%s",
214+ authctxt->krb5_ticket_file);
215+#else
216 snprintf(authctxt->krb5_ccname, len, "FILE:%s",
217 authctxt->krb5_ticket_file);
218+#endif
219
220 #ifdef USE_PAM
221 if (options.use_pam)
222@@ -240,15 +245,22 @@ krb5_cleanup_proc(Authctxt *authctxt)
223 #ifndef HEIMDAL
224 krb5_error_code
225 ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) {
226- int tmpfd, ret, oerrno;
227+ int ret, oerrno;
228 char ccname[40];
229 mode_t old_umask;
230+#ifdef USE_CCAPI
231+ char cctemplate[] = "API:krb5cc_%d";
232+#else
233+ char cctemplate[] = "FILE:/tmp/krb5cc_%d_XXXXXXXXXX";
234+ int tmpfd;
235+#endif
236
237 ret = snprintf(ccname, sizeof(ccname),
238- "FILE:/tmp/krb5cc_%d_XXXXXXXXXX", geteuid());
239+ cctemplate, geteuid());
240 if (ret < 0 || (size_t)ret >= sizeof(ccname))
241 return ENOMEM;
242
243+#ifndef USE_CCAPI
244 old_umask = umask(0177);
245 tmpfd = mkstemp(ccname + strlen("FILE:"));
246 oerrno = errno;
247@@ -265,6 +277,7 @@ ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) {
248 return oerrno;
249 }
250 close(tmpfd);
251+#endif
252
253 return (krb5_cc_resolve(ctx, ccname, ccache));
254 }
255diff --git a/auth.c b/auth.c
256index 63366768..76d586e3 100644
257--- a/auth.c
258+++ b/auth.c
259@@ -396,7 +396,8 @@ auth_root_allowed(struct ssh *ssh, const char *method)
260 case PERMIT_NO_PASSWD:
261 if (strcmp(method, "publickey") == 0 ||
262 strcmp(method, "hostbased") == 0 ||
263- strcmp(method, "gssapi-with-mic") == 0)
264+ strcmp(method, "gssapi-with-mic") == 0 ||
265+ strcmp(method, "gssapi-keyex") == 0)
266 return 1;
267 break;
268 case PERMIT_FORCED_ONLY:
269@@ -728,99 +729,6 @@ fakepw(void)
270 return (&fake);
271 }
272
273-/*
274- * Returns the remote DNS hostname as a string. The returned string must not
275- * be freed. NB. this will usually trigger a DNS query the first time it is
276- * called.
277- * This function does additional checks on the hostname to mitigate some
278- * attacks on legacy rhosts-style authentication.
279- * XXX is RhostsRSAAuthentication vulnerable to these?
280- * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?)
281- */
282-
283-static char *
284-remote_hostname(struct ssh *ssh)
285-{
286- struct sockaddr_storage from;
287- socklen_t fromlen;
288- struct addrinfo hints, *ai, *aitop;
289- char name[NI_MAXHOST], ntop2[NI_MAXHOST];
290- const char *ntop = ssh_remote_ipaddr(ssh);
291-
292- /* Get IP address of client. */
293- fromlen = sizeof(from);
294- memset(&from, 0, sizeof(from));
295- if (getpeername(ssh_packet_get_connection_in(ssh),
296- (struct sockaddr *)&from, &fromlen) < 0) {
297- debug("getpeername failed: %.100s", strerror(errno));
298- return strdup(ntop);
299- }
300-
301- ipv64_normalise_mapped(&from, &fromlen);
302- if (from.ss_family == AF_INET6)
303- fromlen = sizeof(struct sockaddr_in6);
304-
305- debug3("Trying to reverse map address %.100s.", ntop);
306- /* Map the IP address to a host name. */
307- if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
308- NULL, 0, NI_NAMEREQD) != 0) {
309- /* Host name not found. Use ip address. */
310- return strdup(ntop);
311- }
312-
313- /*
314- * if reverse lookup result looks like a numeric hostname,
315- * someone is trying to trick us by PTR record like following:
316- * 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5
317- */
318- memset(&hints, 0, sizeof(hints));
319- hints.ai_socktype = SOCK_DGRAM; /*dummy*/
320- hints.ai_flags = AI_NUMERICHOST;
321- if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
322- logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
323- name, ntop);
324- freeaddrinfo(ai);
325- return strdup(ntop);
326- }
327-
328- /* Names are stored in lowercase. */
329- lowercase(name);
330-
331- /*
332- * Map it back to an IP address and check that the given
333- * address actually is an address of this host. This is
334- * necessary because anyone with access to a name server can
335- * define arbitrary names for an IP address. Mapping from
336- * name to IP address can be trusted better (but can still be
337- * fooled if the intruder has access to the name server of
338- * the domain).
339- */
340- memset(&hints, 0, sizeof(hints));
341- hints.ai_family = from.ss_family;
342- hints.ai_socktype = SOCK_STREAM;
343- if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
344- logit("reverse mapping checking getaddrinfo for %.700s "
345- "[%s] failed.", name, ntop);
346- return strdup(ntop);
347- }
348- /* Look for the address from the list of addresses. */
349- for (ai = aitop; ai; ai = ai->ai_next) {
350- if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
351- sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
352- (strcmp(ntop, ntop2) == 0))
353- break;
354- }
355- freeaddrinfo(aitop);
356- /* If we reached the end of the list, the address was not there. */
357- if (ai == NULL) {
358- /* Address not found for the host name. */
359- logit("Address %.100s maps to %.600s, but this does not "
360- "map back to the address.", ntop, name);
361- return strdup(ntop);
362- }
363- return strdup(name);
364-}
365-
366 /*
367 * Return the canonical name of the host in the other side of the current
368 * connection. The host name is cached, so it is efficient to call this
369diff --git a/auth2-gss.c b/auth2-gss.c
370index 589283b7..fd411d3a 100644
371--- a/auth2-gss.c
372+++ b/auth2-gss.c
373@@ -1,7 +1,7 @@
374 /* $OpenBSD: auth2-gss.c,v 1.26 2017/06/24 06:34:38 djm Exp $ */
375
376 /*
377- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
378+ * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
379 *
380 * Redistribution and use in source and binary forms, with or without
381 * modification, are permitted provided that the following conditions
382@@ -53,6 +53,41 @@ static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh);
383 static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh);
384 static int input_gssapi_errtok(int, u_int32_t, struct ssh *);
385
386+/*
387+ * The 'gssapi_keyex' userauth mechanism.
388+ */
389+static int
390+userauth_gsskeyex(struct ssh *ssh)
391+{
392+ Authctxt *authctxt = ssh->authctxt;
393+ int authenticated = 0;
394+ Buffer b;
395+ gss_buffer_desc mic, gssbuf;
396+ u_int len;
397+
398+ mic.value = packet_get_string(&len);
399+ mic.length = len;
400+
401+ packet_check_eom();
402+
403+ ssh_gssapi_buildmic(&b, authctxt->user, authctxt->service,
404+ "gssapi-keyex");
405+
406+ gssbuf.value = buffer_ptr(&b);
407+ gssbuf.length = buffer_len(&b);
408+
409+ /* gss_kex_context is NULL with privsep, so we can't check it here */
410+ if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gss_kex_context,
411+ &gssbuf, &mic))))
412+ authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user,
413+ authctxt->pw));
414+
415+ buffer_free(&b);
416+ free(mic.value);
417+
418+ return (authenticated);
419+}
420+
421 /*
422 * We only support those mechanisms that we know about (ie ones that we know
423 * how to check local user kuserok and the like)
424@@ -240,7 +275,8 @@ input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh)
425
426 packet_check_eom();
427
428- authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
429+ authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user,
430+ authctxt->pw));
431
432 if ((!use_privsep || mm_is_monitor()) &&
433 (displayname = ssh_gssapi_displayname()) != NULL)
434@@ -281,7 +317,8 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
435 gssbuf.length = buffer_len(&b);
436
437 if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic))))
438- authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
439+ authenticated =
440+ PRIVSEP(ssh_gssapi_userok(authctxt->user, authctxt->pw));
441 else
442 logit("GSSAPI MIC check failed");
443
444@@ -301,6 +338,12 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh)
445 return 0;
446 }
447
448+Authmethod method_gsskeyex = {
449+ "gssapi-keyex",
450+ userauth_gsskeyex,
451+ &options.gss_authentication
452+};
453+
454 Authmethod method_gssapi = {
455 "gssapi-with-mic",
456 userauth_gssapi,
457diff --git a/auth2.c b/auth2.c
458index e0034229..c34f58c4 100644
459--- a/auth2.c
460+++ b/auth2.c
461@@ -72,6 +72,7 @@ extern Authmethod method_passwd;
462 extern Authmethod method_kbdint;
463 extern Authmethod method_hostbased;
464 #ifdef GSSAPI
465+extern Authmethod method_gsskeyex;
466 extern Authmethod method_gssapi;
467 #endif
468
469@@ -79,6 +80,7 @@ Authmethod *authmethods[] = {
470 &method_none,
471 &method_pubkey,
472 #ifdef GSSAPI
473+ &method_gsskeyex,
474 &method_gssapi,
475 #endif
476 &method_passwd,
477diff --git a/canohost.c b/canohost.c
478index f71a0856..404731d2 100644
479--- a/canohost.c
480+++ b/canohost.c
481@@ -35,6 +35,99 @@
482 #include "canohost.h"
483 #include "misc.h"
484
485+/*
486+ * Returns the remote DNS hostname as a string. The returned string must not
487+ * be freed. NB. this will usually trigger a DNS query the first time it is
488+ * called.
489+ * This function does additional checks on the hostname to mitigate some
490+ * attacks on legacy rhosts-style authentication.
491+ * XXX is RhostsRSAAuthentication vulnerable to these?
492+ * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?)
493+ */
494+
495+char *
496+remote_hostname(struct ssh *ssh)
497+{
498+ struct sockaddr_storage from;
499+ socklen_t fromlen;
500+ struct addrinfo hints, *ai, *aitop;
501+ char name[NI_MAXHOST], ntop2[NI_MAXHOST];
502+ const char *ntop = ssh_remote_ipaddr(ssh);
503+
504+ /* Get IP address of client. */
505+ fromlen = sizeof(from);
506+ memset(&from, 0, sizeof(from));
507+ if (getpeername(ssh_packet_get_connection_in(ssh),
508+ (struct sockaddr *)&from, &fromlen) < 0) {
509+ debug("getpeername failed: %.100s", strerror(errno));
510+ return strdup(ntop);
511+ }
512+
513+ ipv64_normalise_mapped(&from, &fromlen);
514+ if (from.ss_family == AF_INET6)
515+ fromlen = sizeof(struct sockaddr_in6);
516+
517+ debug3("Trying to reverse map address %.100s.", ntop);
518+ /* Map the IP address to a host name. */
519+ if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
520+ NULL, 0, NI_NAMEREQD) != 0) {
521+ /* Host name not found. Use ip address. */
522+ return strdup(ntop);
523+ }
524+
525+ /*
526+ * if reverse lookup result looks like a numeric hostname,
527+ * someone is trying to trick us by PTR record like following:
528+ * 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5
529+ */
530+ memset(&hints, 0, sizeof(hints));
531+ hints.ai_socktype = SOCK_DGRAM; /*dummy*/
532+ hints.ai_flags = AI_NUMERICHOST;
533+ if (getaddrinfo(name, NULL, &hints, &ai) == 0) {
534+ logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
535+ name, ntop);
536+ freeaddrinfo(ai);
537+ return strdup(ntop);
538+ }
539+
540+ /* Names are stored in lowercase. */
541+ lowercase(name);
542+
543+ /*
544+ * Map it back to an IP address and check that the given
545+ * address actually is an address of this host. This is
546+ * necessary because anyone with access to a name server can
547+ * define arbitrary names for an IP address. Mapping from
548+ * name to IP address can be trusted better (but can still be
549+ * fooled if the intruder has access to the name server of
550+ * the domain).
551+ */
552+ memset(&hints, 0, sizeof(hints));
553+ hints.ai_family = from.ss_family;
554+ hints.ai_socktype = SOCK_STREAM;
555+ if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
556+ logit("reverse mapping checking getaddrinfo for %.700s "
557+ "[%s] failed.", name, ntop);
558+ return strdup(ntop);
559+ }
560+ /* Look for the address from the list of addresses. */
561+ for (ai = aitop; ai; ai = ai->ai_next) {
562+ if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2,
563+ sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 &&
564+ (strcmp(ntop, ntop2) == 0))
565+ break;
566+ }
567+ freeaddrinfo(aitop);
568+ /* If we reached the end of the list, the address was not there. */
569+ if (ai == NULL) {
570+ /* Address not found for the host name. */
571+ logit("Address %.100s maps to %.600s, but this does not "
572+ "map back to the address.", ntop, name);
573+ return strdup(ntop);
574+ }
575+ return strdup(name);
576+}
577+
578 void
579 ipv64_normalise_mapped(struct sockaddr_storage *addr, socklen_t *len)
580 {
581diff --git a/canohost.h b/canohost.h
582index 26d62855..0cadc9f1 100644
583--- a/canohost.h
584+++ b/canohost.h
585@@ -15,6 +15,9 @@
586 #ifndef _CANOHOST_H
587 #define _CANOHOST_H
588
589+struct ssh;
590+
591+char *remote_hostname(struct ssh *);
592 char *get_peer_ipaddr(int);
593 int get_peer_port(int);
594 char *get_local_ipaddr(int);
595diff --git a/clientloop.c b/clientloop.c
596index 7bcf22e3..ef803e98 100644
597--- a/clientloop.c
598+++ b/clientloop.c
599@@ -112,6 +112,10 @@
600 #include "ssherr.h"
601 #include "hostfile.h"
602
603+#ifdef GSSAPI
604+#include "ssh-gss.h"
605+#endif
606+
607 /* import options */
608 extern Options options;
609
610@@ -1335,9 +1339,18 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg,
611 break;
612
613 /* Do channel operations unless rekeying in progress. */
614- if (!ssh_packet_is_rekeying(ssh))
615+ if (!ssh_packet_is_rekeying(ssh)) {
616 channel_after_select(ssh, readset, writeset);
617
618+#ifdef GSSAPI
619+ if (options.gss_renewal_rekey &&
620+ ssh_gssapi_credentials_updated(NULL)) {
621+ debug("credentials updated - forcing rekey");
622+ need_rekeying = 1;
623+ }
624+#endif
625+ }
626+
627 /* Buffer input from the connection. */
628 client_process_net_input(readset);
629
630diff --git a/config.h.in b/config.h.in
631index 57208740..4c9545c7 100644
632--- a/config.h.in
633+++ b/config.h.in
634@@ -1746,6 +1746,9 @@
635 /* Use btmp to log bad logins */
636 #undef USE_BTMP
637
638+/* platform uses an in-memory credentials cache */
639+#undef USE_CCAPI
640+
641 /* Use libedit for sftp */
642 #undef USE_LIBEDIT
643
644@@ -1761,6 +1764,9 @@
645 /* Use PIPES instead of a socketpair() */
646 #undef USE_PIPES
647
648+/* platform has the Security Authorization Session API */
649+#undef USE_SECURITY_SESSION_API
650+
651 /* Define if you have Solaris privileges */
652 #undef USE_SOLARIS_PRIVS
653
654diff --git a/configure.ac b/configure.ac
655index 663062be..1cd5eab6 100644
656--- a/configure.ac
657+++ b/configure.ac
658@@ -664,6 +664,30 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
659 [Use tunnel device compatibility to OpenBSD])
660 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
661 [Prepend the address family to IP tunnel traffic])
662+ AC_MSG_CHECKING([if we have the Security Authorization Session API])
663+ AC_TRY_COMPILE([#include <Security/AuthSession.h>],
664+ [SessionCreate(0, 0);],
665+ [ac_cv_use_security_session_api="yes"
666+ AC_DEFINE([USE_SECURITY_SESSION_API], [1],
667+ [platform has the Security Authorization Session API])
668+ LIBS="$LIBS -framework Security"
669+ AC_MSG_RESULT([yes])],
670+ [ac_cv_use_security_session_api="no"
671+ AC_MSG_RESULT([no])])
672+ AC_MSG_CHECKING([if we have an in-memory credentials cache])
673+ AC_TRY_COMPILE(
674+ [#include <Kerberos/Kerberos.h>],
675+ [cc_context_t c;
676+ (void) cc_initialize (&c, 0, NULL, NULL);],
677+ [AC_DEFINE([USE_CCAPI], [1],
678+ [platform uses an in-memory credentials cache])
679+ LIBS="$LIBS -framework Security"
680+ AC_MSG_RESULT([yes])
681+ if test "x$ac_cv_use_security_session_api" = "xno"; then
682+ AC_MSG_ERROR([*** Need a security framework to use the credentials cache API ***])
683+ fi],
684+ [AC_MSG_RESULT([no])]
685+ )
686 m4_pattern_allow([AU_IPv])
687 AC_CHECK_DECL([AU_IPv4], [],
688 AC_DEFINE([AU_IPv4], [0], [System only supports IPv4 audit records])
689diff --git a/gss-genr.c b/gss-genr.c
690index 62559ed9..0b3ae073 100644
691--- a/gss-genr.c
692+++ b/gss-genr.c
693@@ -1,7 +1,7 @@
694 /* $OpenBSD: gss-genr.c,v 1.24 2016/09/12 01:22:38 deraadt Exp $ */
695
696 /*
697- * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
698+ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
699 *
700 * Redistribution and use in source and binary forms, with or without
701 * modification, are permitted provided that the following conditions
702@@ -40,12 +40,167 @@
703 #include "buffer.h"
704 #include "log.h"
705 #include "ssh2.h"
706+#include "cipher.h"
707+#include "key.h"
708+#include "kex.h"
709+#include <openssl/evp.h>
710
711 #include "ssh-gss.h"
712
713 extern u_char *session_id2;
714 extern u_int session_id2_len;
715
716+typedef struct {
717+ char *encoded;
718+ gss_OID oid;
719+} ssh_gss_kex_mapping;
720+
721+/*
722+ * XXX - It would be nice to find a more elegant way of handling the
723+ * XXX passing of the key exchange context to the userauth routines
724+ */
725+
726+Gssctxt *gss_kex_context = NULL;
727+
728+static ssh_gss_kex_mapping *gss_enc2oid = NULL;
729+
730+int
731+ssh_gssapi_oid_table_ok(void) {
732+ return (gss_enc2oid != NULL);
733+}
734+
735+/*
736+ * Return a list of the gss-group1-sha1 mechanisms supported by this program
737+ *
738+ * We test mechanisms to ensure that we can use them, to avoid starting
739+ * a key exchange with a bad mechanism
740+ */
741+
742+char *
743+ssh_gssapi_client_mechanisms(const char *host, const char *client) {
744+ gss_OID_set gss_supported;
745+ OM_uint32 min_status;
746+
747+ if (GSS_ERROR(gss_indicate_mechs(&min_status, &gss_supported)))
748+ return NULL;
749+
750+ return(ssh_gssapi_kex_mechs(gss_supported, ssh_gssapi_check_mechanism,
751+ host, client));
752+}
753+
754+char *
755+ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check,
756+ const char *host, const char *client) {
757+ Buffer buf;
758+ size_t i;
759+ int oidpos, enclen;
760+ char *mechs, *encoded;
761+ u_char digest[EVP_MAX_MD_SIZE];
762+ char deroid[2];
763+ const EVP_MD *evp_md = EVP_md5();
764+ EVP_MD_CTX md;
765+
766+ if (gss_enc2oid != NULL) {
767+ for (i = 0; gss_enc2oid[i].encoded != NULL; i++)
768+ free(gss_enc2oid[i].encoded);
769+ free(gss_enc2oid);
770+ }
771+
772+ gss_enc2oid = xmalloc(sizeof(ssh_gss_kex_mapping) *
773+ (gss_supported->count + 1));
774+
775+ buffer_init(&buf);
776+
777+ oidpos = 0;
778+ for (i = 0; i < gss_supported->count; i++) {
779+ if (gss_supported->elements[i].length < 128 &&
780+ (*check)(NULL, &(gss_supported->elements[i]), host, client)) {
781+
782+ deroid[0] = SSH_GSS_OIDTYPE;
783+ deroid[1] = gss_supported->elements[i].length;
784+
785+ EVP_DigestInit(&md, evp_md);
786+ EVP_DigestUpdate(&md, deroid, 2);
787+ EVP_DigestUpdate(&md,
788+ gss_supported->elements[i].elements,
789+ gss_supported->elements[i].length);
790+ EVP_DigestFinal(&md, digest, NULL);
791+
792+ encoded = xmalloc(EVP_MD_size(evp_md) * 2);
793+ enclen = __b64_ntop(digest, EVP_MD_size(evp_md),
794+ encoded, EVP_MD_size(evp_md) * 2);
795+
796+ if (oidpos != 0)
797+ buffer_put_char(&buf, ',');
798+
799+ buffer_append(&buf, KEX_GSS_GEX_SHA1_ID,
800+ sizeof(KEX_GSS_GEX_SHA1_ID) - 1);
801+ buffer_append(&buf, encoded, enclen);
802+ buffer_put_char(&buf, ',');
803+ buffer_append(&buf, KEX_GSS_GRP1_SHA1_ID,
804+ sizeof(KEX_GSS_GRP1_SHA1_ID) - 1);
805+ buffer_append(&buf, encoded, enclen);
806+ buffer_put_char(&buf, ',');
807+ buffer_append(&buf, KEX_GSS_GRP14_SHA1_ID,
808+ sizeof(KEX_GSS_GRP14_SHA1_ID) - 1);
809+ buffer_append(&buf, encoded, enclen);
810+
811+ gss_enc2oid[oidpos].oid = &(gss_supported->elements[i]);
812+ gss_enc2oid[oidpos].encoded = encoded;
813+ oidpos++;
814+ }
815+ }
816+ gss_enc2oid[oidpos].oid = NULL;
817+ gss_enc2oid[oidpos].encoded = NULL;
818+
819+ buffer_put_char(&buf, '\0');
820+
821+ mechs = xmalloc(buffer_len(&buf));
822+ buffer_get(&buf, mechs, buffer_len(&buf));
823+ buffer_free(&buf);
824+
825+ if (strlen(mechs) == 0) {
826+ free(mechs);
827+ mechs = NULL;
828+ }
829+
830+ return (mechs);
831+}
832+
833+gss_OID
834+ssh_gssapi_id_kex(Gssctxt *ctx, char *name, int kex_type) {
835+ int i = 0;
836+
837+ switch (kex_type) {
838+ case KEX_GSS_GRP1_SHA1:
839+ if (strlen(name) < sizeof(KEX_GSS_GRP1_SHA1_ID))
840+ return GSS_C_NO_OID;
841+ name += sizeof(KEX_GSS_GRP1_SHA1_ID) - 1;
842+ break;
843+ case KEX_GSS_GRP14_SHA1:
844+ if (strlen(name) < sizeof(KEX_GSS_GRP14_SHA1_ID))
845+ return GSS_C_NO_OID;
846+ name += sizeof(KEX_GSS_GRP14_SHA1_ID) - 1;
847+ break;
848+ case KEX_GSS_GEX_SHA1:
849+ if (strlen(name) < sizeof(KEX_GSS_GEX_SHA1_ID))
850+ return GSS_C_NO_OID;
851+ name += sizeof(KEX_GSS_GEX_SHA1_ID) - 1;
852+ break;
853+ default:
854+ return GSS_C_NO_OID;
855+ }
856+
857+ while (gss_enc2oid[i].encoded != NULL &&
858+ strcmp(name, gss_enc2oid[i].encoded) != 0)
859+ i++;
860+
861+ if (gss_enc2oid[i].oid != NULL && ctx != NULL)
862+ ssh_gssapi_set_oid(ctx, gss_enc2oid[i].oid);
863+
864+ return gss_enc2oid[i].oid;
865+}
866+
867 /* Check that the OID in a data stream matches that in the context */
868 int
869 ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len)
870@@ -198,7 +353,7 @@ ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds, gss_buffer_desc *recv_tok,
871 }
872
873 ctx->major = gss_init_sec_context(&ctx->minor,
874- GSS_C_NO_CREDENTIAL, &ctx->context, ctx->name, ctx->oid,
875+ ctx->client_creds, &ctx->context, ctx->name, ctx->oid,
876 GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG | deleg_flag,
877 0, NULL, recv_tok, NULL, send_tok, flags, NULL);
878
879@@ -227,9 +382,43 @@ ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
880 return (ctx->major);
881 }
882
883+OM_uint32
884+ssh_gssapi_client_identity(Gssctxt *ctx, const char *name)
885+{
886+ gss_buffer_desc gssbuf;
887+ gss_name_t gssname;
888+ OM_uint32 status;
889+ gss_OID_set oidset;
890+
891+ gssbuf.value = (void *) name;
892+ gssbuf.length = strlen(gssbuf.value);
893+
894+ gss_create_empty_oid_set(&status, &oidset);
895+ gss_add_oid_set_member(&status, ctx->oid, &oidset);
896+
897+ ctx->major = gss_import_name(&ctx->minor, &gssbuf,
898+ GSS_C_NT_USER_NAME, &gssname);
899+
900+ if (!ctx->major)
901+ ctx->major = gss_acquire_cred(&ctx->minor,
902+ gssname, 0, oidset, GSS_C_INITIATE,
903+ &ctx->client_creds, NULL, NULL);
904+
905+ gss_release_name(&status, &gssname);
906+ gss_release_oid_set(&status, &oidset);
907+
908+ if (ctx->major)
909+ ssh_gssapi_error(ctx);
910+
911+ return(ctx->major);
912+}
913+
914 OM_uint32
915 ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash)
916 {
917+ if (ctx == NULL)
918+ return -1;
919+
920 if ((ctx->major = gss_get_mic(&ctx->minor, ctx->context,
921 GSS_C_QOP_DEFAULT, buffer, hash)))
922 ssh_gssapi_error(ctx);
923@@ -237,6 +426,19 @@ ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash)
924 return (ctx->major);
925 }
926
927+/* Priviledged when used by server */
928+OM_uint32
929+ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
930+{
931+ if (ctx == NULL)
932+ return -1;
933+
934+ ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
935+ gssbuf, gssmic, NULL);
936+
937+ return (ctx->major);
938+}
939+
940 void
941 ssh_gssapi_buildmic(Buffer *b, const char *user, const char *service,
942 const char *context)
943@@ -250,11 +452,16 @@ ssh_gssapi_buildmic(Buffer *b, const char *user, const char *service,
944 }
945
946 int
947-ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
948+ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host,
949+ const char *client)
950 {
951 gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
952 OM_uint32 major, minor;
953 gss_OID_desc spnego_oid = {6, (void *)"\x2B\x06\x01\x05\x05\x02"};
954+ Gssctxt *intctx = NULL;
955+
956+ if (ctx == NULL)
957+ ctx = &intctx;
958
959 /* RFC 4462 says we MUST NOT do SPNEGO */
960 if (oid->length == spnego_oid.length &&
961@@ -264,6 +471,10 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
962 ssh_gssapi_build_ctx(ctx);
963 ssh_gssapi_set_oid(*ctx, oid);
964 major = ssh_gssapi_import_name(*ctx, host);
965+
966+ if (!GSS_ERROR(major) && client)
967+ major = ssh_gssapi_client_identity(*ctx, client);
968+
969 if (!GSS_ERROR(major)) {
970 major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
971 NULL);
972@@ -273,10 +484,66 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
973 GSS_C_NO_BUFFER);
974 }
975
976- if (GSS_ERROR(major))
977+ if (GSS_ERROR(major) || intctx != NULL)
978 ssh_gssapi_delete_ctx(ctx);
979
980 return (!GSS_ERROR(major));
981 }
982
983+int
984+ssh_gssapi_credentials_updated(Gssctxt *ctxt) {
985+ static gss_name_t saved_name = GSS_C_NO_NAME;
986+ static OM_uint32 saved_lifetime = 0;
987+ static gss_OID saved_mech = GSS_C_NO_OID;
988+ static gss_name_t name;
989+ static OM_uint32 last_call = 0;
990+ OM_uint32 lifetime, now, major, minor;
991+ int equal;
992+
993+ now = time(NULL);
994+
995+ if (ctxt) {
996+ debug("Rekey has happened - updating saved versions");
997+
998+ if (saved_name != GSS_C_NO_NAME)
999+ gss_release_name(&minor, &saved_name);
1000+
1001+ major = gss_inquire_cred(&minor, GSS_C_NO_CREDENTIAL,
1002+ &saved_name, &saved_lifetime, NULL, NULL);
1003+
1004+ if (!GSS_ERROR(major)) {
1005+ saved_mech = ctxt->oid;
1006+ saved_lifetime+= now;
1007+ } else {
1008+ /* Handle the error */
1009+ }
1010+ return 0;
1011+ }
1012+
1013+ if (now - last_call < 10)
1014+ return 0;
1015+
1016+ last_call = now;
1017+
1018+ if (saved_mech == GSS_C_NO_OID)
1019+ return 0;
1020+
1021+ major = gss_inquire_cred(&minor, GSS_C_NO_CREDENTIAL,
1022+ &name, &lifetime, NULL, NULL);
1023+ if (major == GSS_S_CREDENTIALS_EXPIRED)
1024+ return 0;
1025+ else if (GSS_ERROR(major))
1026+ return 0;
1027+
1028+ major = gss_compare_name(&minor, saved_name, name, &equal);
1029+ gss_release_name(&minor, &name);
1030+ if (GSS_ERROR(major))
1031+ return 0;
1032+
1033+ if (equal && (saved_lifetime < lifetime + now - 10))
1034+ return 1;
1035+
1036+ return 0;
1037+}
1038+
1039 #endif /* GSSAPI */
1040diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
1041index 795992d9..fd8b3718 100644
1042--- a/gss-serv-krb5.c
1043+++ b/gss-serv-krb5.c
1044@@ -1,7 +1,7 @@
1045 /* $OpenBSD: gss-serv-krb5.c,v 1.8 2013/07/20 01:55:13 djm Exp $ */
1046
1047 /*
1048- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
1049+ * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
1050 *
1051 * Redistribution and use in source and binary forms, with or without
1052 * modification, are permitted provided that the following conditions
1053@@ -121,8 +121,8 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
1054 krb5_error_code problem;
1055 krb5_principal princ;
1056 OM_uint32 maj_status, min_status;
1057- int len;
1058 const char *errmsg;
1059+ const char *new_ccname;
1060
1061 if (client->creds == NULL) {
1062 debug("No credentials stored");
1063@@ -181,11 +181,16 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
1064 return;
1065 }
1066
1067- client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache));
1068+ new_ccname = krb5_cc_get_name(krb_context, ccache);
1069+
1070 client->store.envvar = "KRB5CCNAME";
1071- len = strlen(client->store.filename) + 6;
1072- client->store.envval = xmalloc(len);
1073- snprintf(client->store.envval, len, "FILE:%s", client->store.filename);
1074+#ifdef USE_CCAPI
1075+ xasprintf(&client->store.envval, "API:%s", new_ccname);
1076+ client->store.filename = NULL;
1077+#else
1078+ xasprintf(&client->store.envval, "FILE:%s", new_ccname);
1079+ client->store.filename = xstrdup(new_ccname);
1080+#endif
1081
1082 #ifdef USE_PAM
1083 if (options.use_pam)
1084@@ -197,6 +202,71 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
1085 return;
1086 }
1087
1088+int
1089+ssh_gssapi_krb5_updatecreds(ssh_gssapi_ccache *store,
1090+ ssh_gssapi_client *client)
1091+{
1092+ krb5_ccache ccache = NULL;
1093+ krb5_principal principal = NULL;
1094+ char *name = NULL;
1095+ krb5_error_code problem;
1096+ OM_uint32 maj_status, min_status;
1097+
1098+ if ((problem = krb5_cc_resolve(krb_context, store->envval, &ccache))) {
1099+ logit("krb5_cc_resolve(): %.100s",
1100+ krb5_get_err_text(krb_context, problem));
1101+ return 0;
1102+ }
1103+
1104+ /* Find out who the principal in this cache is */
1105+ if ((problem = krb5_cc_get_principal(krb_context, ccache,
1106+ &principal))) {
1107+ logit("krb5_cc_get_principal(): %.100s",
1108+ krb5_get_err_text(krb_context, problem));
1109+ krb5_cc_close(krb_context, ccache);
1110+ return 0;
1111+ }
1112+
1113+ if ((problem = krb5_unparse_name(krb_context, principal, &name))) {
1114+ logit("krb5_unparse_name(): %.100s",
1115+ krb5_get_err_text(krb_context, problem));
1116+ krb5_free_principal(krb_context, principal);
1117+ krb5_cc_close(krb_context, ccache);
1118+ return 0;
1119+ }
1120+
1121+
1122+ if (strcmp(name,client->exportedname.value)!=0) {
1123+ debug("Name in local credentials cache differs. Not storing");
1124+ krb5_free_principal(krb_context, principal);
1125+ krb5_cc_close(krb_context, ccache);
1126+ krb5_free_unparsed_name(krb_context, name);
1127+ return 0;
1128+ }
1129+ krb5_free_unparsed_name(krb_context, name);
1130+
1131+ /* Name matches, so lets get on with it! */
1132+
1133+ if ((problem = krb5_cc_initialize(krb_context, ccache, principal))) {
1134+ logit("krb5_cc_initialize(): %.100s",
1135+ krb5_get_err_text(krb_context, problem));
1136+ krb5_free_principal(krb_context, principal);
1137+ krb5_cc_close(krb_context, ccache);
1138+ return 0;
1139+ }
1140+
1141+ krb5_free_principal(krb_context, principal);
1142+
1143+ if ((maj_status = gss_krb5_copy_ccache(&min_status, client->creds,
1144+ ccache))) {
1145+ logit("gss_krb5_copy_ccache() failed. Sorry!");
1146+ krb5_cc_close(krb_context, ccache);
1147+ return 0;
1148+ }
1149+
1150+ return 1;
1151+}
1152+
1153 ssh_gssapi_mech gssapi_kerberos_mech = {
1154 "toWM5Slw5Ew8Mqkay+al2g==",
1155 "Kerberos",
1156@@ -204,7 +274,8 @@ ssh_gssapi_mech gssapi_kerberos_mech = {
1157 NULL,
1158 &ssh_gssapi_krb5_userok,
1159 NULL,
1160- &ssh_gssapi_krb5_storecreds
1161+ &ssh_gssapi_krb5_storecreds,
1162+ &ssh_gssapi_krb5_updatecreds
1163 };
1164
1165 #endif /* KRB5 */
1166diff --git a/gss-serv.c b/gss-serv.c
1167index 6cae720e..967c6cfb 100644
1168--- a/gss-serv.c
1169+++ b/gss-serv.c
1170@@ -1,7 +1,7 @@
1171 /* $OpenBSD: gss-serv.c,v 1.30 2017/06/24 06:34:38 djm Exp $ */
1172
1173 /*
1174- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
1175+ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
1176 *
1177 * Redistribution and use in source and binary forms, with or without
1178 * modification, are permitted provided that the following conditions
1179@@ -45,17 +45,22 @@
1180 #include "session.h"
1181 #include "misc.h"
1182 #include "servconf.h"
1183+#include "uidswap.h"
1184
1185 #include "ssh-gss.h"
1186+#include "monitor_wrap.h"
1187+
1188+extern ServerOptions options;
1189
1190 extern ServerOptions options;
1191
1192 static ssh_gssapi_client gssapi_client =
1193 { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER,
1194- GSS_C_NO_CREDENTIAL, NULL, {NULL, NULL, NULL, NULL}};
1195+ GSS_C_NO_CREDENTIAL, GSS_C_NO_NAME, NULL,
1196+ {NULL, NULL, NULL, NULL, NULL}, 0, 0};
1197
1198 ssh_gssapi_mech gssapi_null_mech =
1199- { NULL, NULL, {0, NULL}, NULL, NULL, NULL, NULL};
1200+ { NULL, NULL, {0, NULL}, NULL, NULL, NULL, NULL, NULL};
1201
1202 #ifdef KRB5
1203 extern ssh_gssapi_mech gssapi_kerberos_mech;
1204@@ -141,6 +146,28 @@ ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid)
1205 return (ssh_gssapi_acquire_cred(*ctx));
1206 }
1207
1208+/* Unprivileged */
1209+char *
1210+ssh_gssapi_server_mechanisms(void) {
1211+ if (supported_oids == NULL)
1212+ ssh_gssapi_prepare_supported_oids();
1213+ return (ssh_gssapi_kex_mechs(supported_oids,
1214+ &ssh_gssapi_server_check_mech, NULL, NULL));
1215+}
1216+
1217+/* Unprivileged */
1218+int
1219+ssh_gssapi_server_check_mech(Gssctxt **dum, gss_OID oid, const char *data,
1220+ const char *dummy) {
1221+ Gssctxt *ctx = NULL;
1222+ int res;
1223+
1224+ res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid)));
1225+ ssh_gssapi_delete_ctx(&ctx);
1226+
1227+ return (res);
1228+}
1229+
1230 /* Unprivileged */
1231 void
1232 ssh_gssapi_supported_oids(gss_OID_set *oidset)
1233@@ -151,7 +178,9 @@ ssh_gssapi_supported_oids(gss_OID_set *oidset)
1234 gss_OID_set supported;
1235
1236 gss_create_empty_oid_set(&min_status, oidset);
1237- gss_indicate_mechs(&min_status, &supported);
1238+
1239+ if (GSS_ERROR(gss_indicate_mechs(&min_status, &supported)))
1240+ return;
1241
1242 while (supported_mechs[i]->name != NULL) {
1243 if (GSS_ERROR(gss_test_oid_set_member(&min_status,
1244@@ -277,8 +306,48 @@ OM_uint32
1245 ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
1246 {
1247 int i = 0;
1248+ int equal = 0;
1249+ gss_name_t new_name = GSS_C_NO_NAME;
1250+ gss_buffer_desc ename = GSS_C_EMPTY_BUFFER;
1251+
1252+ if (options.gss_store_rekey && client->used && ctx->client_creds) {
1253+ if (client->mech->oid.length != ctx->oid->length ||
1254+ (memcmp(client->mech->oid.elements,
1255+ ctx->oid->elements, ctx->oid->length) !=0)) {
1256+ debug("Rekeyed credentials have different mechanism");
1257+ return GSS_S_COMPLETE;
1258+ }
1259+
1260+ if ((ctx->major = gss_inquire_cred_by_mech(&ctx->minor,
1261+ ctx->client_creds, ctx->oid, &new_name,
1262+ NULL, NULL, NULL))) {
1263+ ssh_gssapi_error(ctx);
1264+ return (ctx->major);
1265+ }
1266+
1267+ ctx->major = gss_compare_name(&ctx->minor, client->name,
1268+ new_name, &equal);
1269+
1270+ if (GSS_ERROR(ctx->major)) {
1271+ ssh_gssapi_error(ctx);
1272+ return (ctx->major);
1273+ }
1274+
1275+ if (!equal) {
1276+ debug("Rekeyed credentials have different name");
1277+ return GSS_S_COMPLETE;
1278+ }
1279
1280- gss_buffer_desc ename;
1281+ debug("Marking rekeyed credentials for export");
1282+
1283+ gss_release_name(&ctx->minor, &client->name);
1284+ gss_release_cred(&ctx->minor, &client->creds);
1285+ client->name = new_name;
1286+ client->creds = ctx->client_creds;
1287+ ctx->client_creds = GSS_C_NO_CREDENTIAL;
1288+ client->updated = 1;
1289+ return GSS_S_COMPLETE;
1290+ }
1291
1292 client->mech = NULL;
1293
1294@@ -293,6 +362,13 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
1295 if (client->mech == NULL)
1296 return GSS_S_FAILURE;
1297
1298+ if (ctx->client_creds &&
1299+ (ctx->major = gss_inquire_cred_by_mech(&ctx->minor,
1300+ ctx->client_creds, ctx->oid, &client->name, NULL, NULL, NULL))) {
1301+ ssh_gssapi_error(ctx);
1302+ return (ctx->major);
1303+ }
1304+
1305 if ((ctx->major = gss_display_name(&ctx->minor, ctx->client,
1306 &client->displayname, NULL))) {
1307 ssh_gssapi_error(ctx);
1308@@ -310,6 +386,8 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
1309 return (ctx->major);
1310 }
1311
1312+ gss_release_buffer(&ctx->minor, &ename);
1313+
1314 /* We can't copy this structure, so we just move the pointer to it */
1315 client->creds = ctx->client_creds;
1316 ctx->client_creds = GSS_C_NO_CREDENTIAL;
1317@@ -357,7 +435,7 @@ ssh_gssapi_do_child(char ***envp, u_int *envsizep)
1318
1319 /* Privileged */
1320 int
1321-ssh_gssapi_userok(char *user)
1322+ssh_gssapi_userok(char *user, struct passwd *pw)
1323 {
1324 OM_uint32 lmin;
1325
1326@@ -367,9 +445,11 @@ ssh_gssapi_userok(char *user)
1327 return 0;
1328 }
1329 if (gssapi_client.mech && gssapi_client.mech->userok)
1330- if ((*gssapi_client.mech->userok)(&gssapi_client, user))
1331+ if ((*gssapi_client.mech->userok)(&gssapi_client, user)) {
1332+ gssapi_client.used = 1;
1333+ gssapi_client.store.owner = pw;
1334 return 1;
1335- else {
1336+ } else {
1337 /* Destroy delegated credentials if userok fails */
1338 gss_release_buffer(&lmin, &gssapi_client.displayname);
1339 gss_release_buffer(&lmin, &gssapi_client.exportedname);
1340@@ -383,14 +463,90 @@ ssh_gssapi_userok(char *user)
1341 return (0);
1342 }
1343
1344-/* Privileged */
1345-OM_uint32
1346-ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
1347+/* These bits are only used for rekeying. The unpriviledged child is running
1348+ * as the user, the monitor is root.
1349+ *
1350+ * In the child, we want to :
1351+ * *) Ask the monitor to store our credentials into the store we specify
1352+ * *) If it succeeds, maybe do a PAM update
1353+ */
1354+
1355+/* Stuff for PAM */
1356+
1357+#ifdef USE_PAM
1358+static int ssh_gssapi_simple_conv(int n, const struct pam_message **msg,
1359+ struct pam_response **resp, void *data)
1360 {
1361- ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
1362- gssbuf, gssmic, NULL);
1363+ return (PAM_CONV_ERR);
1364+}
1365+#endif
1366
1367- return (ctx->major);
1368+void
1369+ssh_gssapi_rekey_creds(void) {
1370+ int ok;
1371+ int ret;
1372+#ifdef USE_PAM
1373+ pam_handle_t *pamh = NULL;
1374+ struct pam_conv pamconv = {ssh_gssapi_simple_conv, NULL};
1375+ char *envstr;
1376+#endif
1377+
1378+ if (gssapi_client.store.filename == NULL &&
1379+ gssapi_client.store.envval == NULL &&
1380+ gssapi_client.store.envvar == NULL)
1381+ return;
1382+
1383+ ok = PRIVSEP(ssh_gssapi_update_creds(&gssapi_client.store));
1384+
1385+ if (!ok)
1386+ return;
1387+
1388+ debug("Rekeyed credentials stored successfully");
1389+
1390+ /* Actually managing to play with the ssh pam stack from here will
1391+ * be next to impossible. In any case, we may want different options
1392+ * for rekeying. So, use our own :)
1393+ */
1394+#ifdef USE_PAM
1395+ if (!use_privsep) {
1396+ debug("Not even going to try and do PAM with privsep disabled");
1397+ return;
1398+ }
1399+
1400+ ret = pam_start("sshd-rekey", gssapi_client.store.owner->pw_name,
1401+ &pamconv, &pamh);
1402+ if (ret)
1403+ return;
1404+
1405+ xasprintf(&envstr, "%s=%s", gssapi_client.store.envvar,
1406+ gssapi_client.store.envval);
1407+
1408+ ret = pam_putenv(pamh, envstr);
1409+ if (!ret)
1410+ pam_setcred(pamh, PAM_REINITIALIZE_CRED);
1411+ pam_end(pamh, PAM_SUCCESS);
1412+#endif
1413+}
1414+
1415+int
1416+ssh_gssapi_update_creds(ssh_gssapi_ccache *store) {
1417+ int ok = 0;
1418+
1419+ /* Check we've got credentials to store */
1420+ if (!gssapi_client.updated)
1421+ return 0;
1422+
1423+ gssapi_client.updated = 0;
1424+
1425+ temporarily_use_uid(gssapi_client.store.owner);
1426+ if (gssapi_client.mech && gssapi_client.mech->updatecreds)
1427+ ok = (*gssapi_client.mech->updatecreds)(store, &gssapi_client);
1428+ else
1429+ debug("No update function for this mechanism");
1430+
1431+ restore_uid();
1432+
1433+ return ok;
1434 }
1435
1436 /* Privileged */
1437diff --git a/kex.c b/kex.c
1438index 15ea28b0..6cc2935f 100644
1439--- a/kex.c
1440+++ b/kex.c
1441@@ -54,6 +54,10 @@
1442 #include "sshbuf.h"
1443 #include "digest.h"
1444
1445+#ifdef GSSAPI
1446+#include "ssh-gss.h"
1447+#endif
1448+
1449 /* prototype */
1450 static int kex_choose_conf(struct ssh *);
1451 static int kex_input_newkeys(int, u_int32_t, struct ssh *);
1452@@ -105,6 +109,14 @@ static const struct kexalg kexalgs[] = {
1453 #endif /* HAVE_EVP_SHA256 || !WITH_OPENSSL */
1454 { NULL, -1, -1, -1},
1455 };
1456+static const struct kexalg kexalg_prefixes[] = {
1457+#ifdef GSSAPI
1458+ { KEX_GSS_GEX_SHA1_ID, KEX_GSS_GEX_SHA1, 0, SSH_DIGEST_SHA1 },
1459+ { KEX_GSS_GRP1_SHA1_ID, KEX_GSS_GRP1_SHA1, 0, SSH_DIGEST_SHA1 },
1460+ { KEX_GSS_GRP14_SHA1_ID, KEX_GSS_GRP14_SHA1, 0, SSH_DIGEST_SHA1 },
1461+#endif
1462+ { NULL, -1, -1, -1 },
1463+};
1464
1465 char *
1466 kex_alg_list(char sep)
1467@@ -137,6 +149,10 @@ kex_alg_by_name(const char *name)
1468 if (strcmp(k->name, name) == 0)
1469 return k;
1470 }
1471+ for (k = kexalg_prefixes; k->name != NULL; k++) {
1472+ if (strncmp(k->name, name, strlen(k->name)) == 0)
1473+ return k;
1474+ }
1475 return NULL;
1476 }
1477
1478@@ -599,6 +615,9 @@ kex_free(struct kex *kex)
1479 sshbuf_free(kex->peer);
1480 sshbuf_free(kex->my);
1481 free(kex->session_id);
1482+#ifdef GSSAPI
1483+ free(kex->gss_host);
1484+#endif /* GSSAPI */
1485 free(kex->client_version_string);
1486 free(kex->server_version_string);
1487 free(kex->failed_choice);
1488diff --git a/kex.h b/kex.h
1489index 01bb3986..a708e486 100644
1490--- a/kex.h
1491+++ b/kex.h
1492@@ -99,6 +99,9 @@ enum kex_exchange {
1493 KEX_DH_GEX_SHA256,
1494 KEX_ECDH_SHA2,
1495 KEX_C25519_SHA256,
1496+ KEX_GSS_GRP1_SHA1,
1497+ KEX_GSS_GRP14_SHA1,
1498+ KEX_GSS_GEX_SHA1,
1499 KEX_MAX
1500 };
1501
1502@@ -147,6 +150,12 @@ struct kex {
1503 u_int flags;
1504 int hash_alg;
1505 int ec_nid;
1506+#ifdef GSSAPI
1507+ int gss_deleg_creds;
1508+ int gss_trust_dns;
1509+ char *gss_host;
1510+ char *gss_client;
1511+#endif
1512 char *client_version_string;
1513 char *server_version_string;
1514 char *failed_choice;
1515@@ -197,6 +206,11 @@ int kexecdh_server(struct ssh *);
1516 int kexc25519_client(struct ssh *);
1517 int kexc25519_server(struct ssh *);
1518
1519+#ifdef GSSAPI
1520+int kexgss_client(struct ssh *);
1521+int kexgss_server(struct ssh *);
1522+#endif
1523+
1524 int kex_dh_hash(int, const char *, const char *,
1525 const u_char *, size_t, const u_char *, size_t, const u_char *, size_t,
1526 const BIGNUM *, const BIGNUM *, const BIGNUM *, u_char *, size_t *);
1527diff --git a/kexgssc.c b/kexgssc.c
1528new file mode 100644
1529index 00000000..10447f2b
1530--- /dev/null
1531+++ b/kexgssc.c
1532@@ -0,0 +1,338 @@
1533+/*
1534+ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
1535+ *
1536+ * Redistribution and use in source and binary forms, with or without
1537+ * modification, are permitted provided that the following conditions
1538+ * are met:
1539+ * 1. Redistributions of source code must retain the above copyright
1540+ * notice, this list of conditions and the following disclaimer.
1541+ * 2. Redistributions in binary form must reproduce the above copyright
1542+ * notice, this list of conditions and the following disclaimer in the
1543+ * documentation and/or other materials provided with the distribution.
1544+ *
1545+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
1546+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1547+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1548+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1549+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1550+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1551+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1552+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1553+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1554+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1555+ */
1556+
1557+#include "includes.h"
1558+
1559+#ifdef GSSAPI
1560+
1561+#include "includes.h"
1562+
1563+#include <openssl/crypto.h>
1564+#include <openssl/bn.h>
1565+
1566+#include <string.h>
1567+
1568+#include "xmalloc.h"
1569+#include "buffer.h"
1570+#include "ssh2.h"
1571+#include "key.h"
1572+#include "cipher.h"
1573+#include "kex.h"
1574+#include "log.h"
1575+#include "packet.h"
1576+#include "dh.h"
1577+#include "digest.h"
1578+
1579+#include "ssh-gss.h"
1580+
1581+int
1582+kexgss_client(struct ssh *ssh) {
1583+ gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
1584+ gss_buffer_desc recv_tok, gssbuf, msg_tok, *token_ptr;
1585+ Gssctxt *ctxt;
1586+ OM_uint32 maj_status, min_status, ret_flags;
1587+ u_int klen, kout, slen = 0, strlen;
1588+ DH *dh;
1589+ BIGNUM *dh_server_pub = NULL;
1590+ BIGNUM *shared_secret = NULL;
1591+ BIGNUM *p = NULL;
1592+ BIGNUM *g = NULL;
1593+ u_char *kbuf;
1594+ u_char *serverhostkey = NULL;
1595+ u_char *empty = "";
1596+ char *msg;
1597+ int type = 0;
1598+ int first = 1;
1599+ int nbits = 0, min = DH_GRP_MIN, max = DH_GRP_MAX;
1600+ u_char hash[SSH_DIGEST_MAX_LENGTH];
1601+ size_t hashlen;
1602+
1603+ /* Initialise our GSSAPI world */
1604+ ssh_gssapi_build_ctx(&ctxt);
1605+ if (ssh_gssapi_id_kex(ctxt, ssh->kex->name, ssh->kex->kex_type)
1606+ == GSS_C_NO_OID)
1607+ fatal("Couldn't identify host exchange");
1608+
1609+ if (ssh_gssapi_import_name(ctxt, ssh->kex->gss_host))
1610+ fatal("Couldn't import hostname");
1611+
1612+ if (ssh->kex->gss_client &&
1613+ ssh_gssapi_client_identity(ctxt, ssh->kex->gss_client))
1614+ fatal("Couldn't acquire client credentials");
1615+
1616+ switch (ssh->kex->kex_type) {
1617+ case KEX_GSS_GRP1_SHA1:
1618+ dh = dh_new_group1();
1619+ break;
1620+ case KEX_GSS_GRP14_SHA1:
1621+ dh = dh_new_group14();
1622+ break;
1623+ case KEX_GSS_GEX_SHA1:
1624+ debug("Doing group exchange\n");
1625+ nbits = dh_estimate(ssh->kex->we_need * 8);
1626+ packet_start(SSH2_MSG_KEXGSS_GROUPREQ);
1627+ packet_put_int(min);
1628+ packet_put_int(nbits);
1629+ packet_put_int(max);
1630+
1631+ packet_send();
1632+
1633+ packet_read_expect(SSH2_MSG_KEXGSS_GROUP);
1634+
1635+ if ((p = BN_new()) == NULL)
1636+ fatal("BN_new() failed");
1637+ packet_get_bignum2(p);
1638+ if ((g = BN_new()) == NULL)
1639+ fatal("BN_new() failed");
1640+ packet_get_bignum2(g);
1641+ packet_check_eom();
1642+
1643+ if (BN_num_bits(p) < min || BN_num_bits(p) > max)
1644+ fatal("GSSGRP_GEX group out of range: %d !< %d !< %d",
1645+ min, BN_num_bits(p), max);
1646+
1647+ dh = dh_new_group(g, p);
1648+ break;
1649+ default:
1650+ fatal("%s: Unexpected KEX type %d", __func__, ssh->kex->kex_type);
1651+ }
1652+
1653+ /* Step 1 - e is dh->pub_key */
1654+ dh_gen_key(dh, ssh->kex->we_need * 8);
1655+
1656+ /* This is f, we initialise it now to make life easier */
1657+ dh_server_pub = BN_new();
1658+ if (dh_server_pub == NULL)
1659+ fatal("dh_server_pub == NULL");
1660+
1661+ token_ptr = GSS_C_NO_BUFFER;
1662+
1663+ do {
1664+ debug("Calling gss_init_sec_context");
1665+
1666+ maj_status = ssh_gssapi_init_ctx(ctxt,
1667+ ssh->kex->gss_deleg_creds, token_ptr, &send_tok,
1668+ &ret_flags);
1669+
1670+ if (GSS_ERROR(maj_status)) {
1671+ if (send_tok.length != 0) {
1672+ packet_start(SSH2_MSG_KEXGSS_CONTINUE);
1673+ packet_put_string(send_tok.value,
1674+ send_tok.length);
1675+ }
1676+ fatal("gss_init_context failed");
1677+ }
1678+
1679+ /* If we've got an old receive buffer get rid of it */
1680+ if (token_ptr != GSS_C_NO_BUFFER)
1681+ free(recv_tok.value);
1682+
1683+ if (maj_status == GSS_S_COMPLETE) {
1684+ /* If mutual state flag is not true, kex fails */
1685+ if (!(ret_flags & GSS_C_MUTUAL_FLAG))
1686+ fatal("Mutual authentication failed");
1687+
1688+ /* If integ avail flag is not true kex fails */
1689+ if (!(ret_flags & GSS_C_INTEG_FLAG))
1690+ fatal("Integrity check failed");
1691+ }
1692+
1693+ /*
1694+ * If we have data to send, then the last message that we
1695+ * received cannot have been a 'complete'.
1696+ */
1697+ if (send_tok.length != 0) {
1698+ if (first) {
1699+ packet_start(SSH2_MSG_KEXGSS_INIT);
1700+ packet_put_string(send_tok.value,
1701+ send_tok.length);
1702+ packet_put_bignum2(dh->pub_key);
1703+ first = 0;
1704+ } else {
1705+ packet_start(SSH2_MSG_KEXGSS_CONTINUE);
1706+ packet_put_string(send_tok.value,
1707+ send_tok.length);
1708+ }
1709+ packet_send();
1710+ gss_release_buffer(&min_status, &send_tok);
1711+
1712+ /* If we've sent them data, they should reply */
1713+ do {
1714+ type = packet_read();
1715+ if (type == SSH2_MSG_KEXGSS_HOSTKEY) {
1716+ debug("Received KEXGSS_HOSTKEY");
1717+ if (serverhostkey)
1718+ fatal("Server host key received more than once");
1719+ serverhostkey =
1720+ packet_get_string(&slen);
1721+ }
1722+ } while (type == SSH2_MSG_KEXGSS_HOSTKEY);
1723+
1724+ switch (type) {
1725+ case SSH2_MSG_KEXGSS_CONTINUE:
1726+ debug("Received GSSAPI_CONTINUE");
1727+ if (maj_status == GSS_S_COMPLETE)
1728+ fatal("GSSAPI Continue received from server when complete");
1729+ recv_tok.value = packet_get_string(&strlen);
1730+ recv_tok.length = strlen;
1731+ break;
1732+ case SSH2_MSG_KEXGSS_COMPLETE:
1733+ debug("Received GSSAPI_COMPLETE");
1734+ packet_get_bignum2(dh_server_pub);
1735+ msg_tok.value = packet_get_string(&strlen);
1736+ msg_tok.length = strlen;
1737+
1738+ /* Is there a token included? */
1739+ if (packet_get_char()) {
1740+ recv_tok.value=
1741+ packet_get_string(&strlen);
1742+ recv_tok.length = strlen;
1743+ /* If we're already complete - protocol error */
1744+ if (maj_status == GSS_S_COMPLETE)
1745+ packet_disconnect("Protocol error: received token when complete");
1746+ } else {
1747+ /* No token included */
1748+ if (maj_status != GSS_S_COMPLETE)
1749+ packet_disconnect("Protocol error: did not receive final token");
1750+ }
1751+ break;
1752+ case SSH2_MSG_KEXGSS_ERROR:
1753+ debug("Received Error");
1754+ maj_status = packet_get_int();
1755+ min_status = packet_get_int();
1756+ msg = packet_get_string(NULL);
1757+ (void) packet_get_string_ptr(NULL);
1758+ fatal("GSSAPI Error: \n%.400s",msg);
1759+ default:
1760+ packet_disconnect("Protocol error: didn't expect packet type %d",
1761+ type);
1762+ }
1763+ token_ptr = &recv_tok;
1764+ } else {
1765+ /* No data, and not complete */
1766+ if (maj_status != GSS_S_COMPLETE)
1767+ fatal("Not complete, and no token output");
1768+ }
1769+ } while (maj_status & GSS_S_CONTINUE_NEEDED);
1770+
1771+ /*
1772+ * We _must_ have received a COMPLETE message in reply from the
1773+ * server, which will have set dh_server_pub and msg_tok
1774+ */
1775+
1776+ if (type != SSH2_MSG_KEXGSS_COMPLETE)
1777+ fatal("Didn't receive a SSH2_MSG_KEXGSS_COMPLETE when I expected it");
1778+
1779+ /* Check f in range [1, p-1] */
1780+ if (!dh_pub_is_valid(dh, dh_server_pub))
1781+ packet_disconnect("bad server public DH value");
1782+
1783+ /* compute K=f^x mod p */
1784+ klen = DH_size(dh);
1785+ kbuf = xmalloc(klen);
1786+ kout = DH_compute_key(kbuf, dh_server_pub, dh);
1787+ if (kout < 0)
1788+ fatal("DH_compute_key: failed");
1789+
1790+ shared_secret = BN_new();
1791+ if (shared_secret == NULL)
1792+ fatal("kexgss_client: BN_new failed");
1793+
1794+ if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
1795+ fatal("kexdh_client: BN_bin2bn failed");
1796+
1797+ memset(kbuf, 0, klen);
1798+ free(kbuf);
1799+
1800+ hashlen = sizeof(hash);
1801+ switch (ssh->kex->kex_type) {
1802+ case KEX_GSS_GRP1_SHA1:
1803+ case KEX_GSS_GRP14_SHA1:
1804+ kex_dh_hash(
1805+ ssh->kex->hash_alg,
1806+ ssh->kex->client_version_string,
1807+ ssh->kex->server_version_string,
1808+ buffer_ptr(ssh->kex->my), buffer_len(ssh->kex->my),
1809+ buffer_ptr(ssh->kex->peer), buffer_len(ssh->kex->peer),
1810+ (serverhostkey ? serverhostkey : empty), slen,
1811+ dh->pub_key, /* e */
1812+ dh_server_pub, /* f */
1813+ shared_secret, /* K */
1814+ hash, &hashlen
1815+ );
1816+ break;
1817+ case KEX_GSS_GEX_SHA1:
1818+ kexgex_hash(
1819+ ssh->kex->hash_alg,
1820+ ssh->kex->client_version_string,
1821+ ssh->kex->server_version_string,
1822+ buffer_ptr(ssh->kex->my), buffer_len(ssh->kex->my),
1823+ buffer_ptr(ssh->kex->peer), buffer_len(ssh->kex->peer),
1824+ (serverhostkey ? serverhostkey : empty), slen,
1825+ min, nbits, max,
1826+ dh->p, dh->g,
1827+ dh->pub_key,
1828+ dh_server_pub,
1829+ shared_secret,
1830+ hash, &hashlen
1831+ );
1832+ break;
1833+ default:
1834+ fatal("%s: Unexpected KEX type %d", __func__, ssh->kex->kex_type);
1835+ }
1836+
1837+ gssbuf.value = hash;
1838+ gssbuf.length = hashlen;
1839+
1840+ /* Verify that the hash matches the MIC we just got. */
1841+ if (GSS_ERROR(ssh_gssapi_checkmic(ctxt, &gssbuf, &msg_tok)))
1842+ packet_disconnect("Hash's MIC didn't verify");
1843+
1844+ free(msg_tok.value);
1845+
1846+ DH_free(dh);
1847+ free(serverhostkey);
1848+ BN_clear_free(dh_server_pub);
1849+
1850+ /* save session id */
1851+ if (ssh->kex->session_id == NULL) {
1852+ ssh->kex->session_id_len = hashlen;
1853+ ssh->kex->session_id = xmalloc(ssh->kex->session_id_len);
1854+ memcpy(ssh->kex->session_id, hash, ssh->kex->session_id_len);
1855+ }
1856+
1857+ if (ssh->kex->gss_deleg_creds)
1858+ ssh_gssapi_credentials_updated(ctxt);
1859+
1860+ if (gss_kex_context == NULL)
1861+ gss_kex_context = ctxt;
1862+ else
1863+ ssh_gssapi_delete_ctx(&ctxt);
1864+
1865+ kex_derive_keys_bn(ssh, hash, hashlen, shared_secret);
1866+ BN_clear_free(shared_secret);
1867+ return kex_send_newkeys(ssh);
1868+}
1869+
1870+#endif /* GSSAPI */
1871diff --git a/kexgsss.c b/kexgsss.c
1872new file mode 100644
1873index 00000000..38ca082b
1874--- /dev/null
1875+++ b/kexgsss.c
1876@@ -0,0 +1,295 @@
1877+/*
1878+ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
1879+ *
1880+ * Redistribution and use in source and binary forms, with or without
1881+ * modification, are permitted provided that the following conditions
1882+ * are met:
1883+ * 1. Redistributions of source code must retain the above copyright
1884+ * notice, this list of conditions and the following disclaimer.
1885+ * 2. Redistributions in binary form must reproduce the above copyright
1886+ * notice, this list of conditions and the following disclaimer in the
1887+ * documentation and/or other materials provided with the distribution.
1888+ *
1889+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
1890+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1891+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1892+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1893+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1894+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1895+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1896+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1897+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1898+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1899+ */
1900+
1901+#include "includes.h"
1902+
1903+#ifdef GSSAPI
1904+
1905+#include <string.h>
1906+
1907+#include <openssl/crypto.h>
1908+#include <openssl/bn.h>
1909+
1910+#include "xmalloc.h"
1911+#include "buffer.h"
1912+#include "ssh2.h"
1913+#include "key.h"
1914+#include "cipher.h"
1915+#include "kex.h"
1916+#include "log.h"
1917+#include "packet.h"
1918+#include "dh.h"
1919+#include "ssh-gss.h"
1920+#include "monitor_wrap.h"
1921+#include "misc.h"
1922+#include "servconf.h"
1923+#include "digest.h"
1924+
1925+extern ServerOptions options;
1926+
1927+int
1928+kexgss_server(struct ssh *ssh)
1929+{
1930+ OM_uint32 maj_status, min_status;
1931+
1932+ /*
1933+ * Some GSSAPI implementations use the input value of ret_flags (an
1934+ * output variable) as a means of triggering mechanism specific
1935+ * features. Initializing it to zero avoids inadvertently
1936+ * activating this non-standard behaviour.
1937+ */
1938+
1939+ OM_uint32 ret_flags = 0;
1940+ gss_buffer_desc gssbuf, recv_tok, msg_tok;
1941+ gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
1942+ Gssctxt *ctxt = NULL;
1943+ u_int slen, klen, kout;
1944+ u_char *kbuf;
1945+ DH *dh;
1946+ int min = -1, max = -1, nbits = -1;
1947+ BIGNUM *shared_secret = NULL;
1948+ BIGNUM *dh_client_pub = NULL;
1949+ int type = 0;
1950+ gss_OID oid;
1951+ char *mechs;
1952+ u_char hash[SSH_DIGEST_MAX_LENGTH];
1953+ size_t hashlen;
1954+
1955+ /* Initialise GSSAPI */
1956+
1957+ /* If we're rekeying, privsep means that some of the private structures
1958+ * in the GSSAPI code are no longer available. This kludges them back
1959+ * into life
1960+ */
1961+ if (!ssh_gssapi_oid_table_ok()) {
1962+ mechs = ssh_gssapi_server_mechanisms();
1963+ free(mechs);
1964+ }
1965+
1966+ debug2("%s: Identifying %s", __func__, ssh->kex->name);
1967+ oid = ssh_gssapi_id_kex(NULL, ssh->kex->name, ssh->kex->kex_type);
1968+ if (oid == GSS_C_NO_OID)
1969+ fatal("Unknown gssapi mechanism");
1970+
1971+ debug2("%s: Acquiring credentials", __func__);
1972+
1973+ if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, oid))))
1974+ fatal("Unable to acquire credentials for the server");
1975+
1976+ switch (ssh->kex->kex_type) {
1977+ case KEX_GSS_GRP1_SHA1:
1978+ dh = dh_new_group1();
1979+ break;
1980+ case KEX_GSS_GRP14_SHA1:
1981+ dh = dh_new_group14();
1982+ break;
1983+ case KEX_GSS_GEX_SHA1:
1984+ debug("Doing group exchange");
1985+ packet_read_expect(SSH2_MSG_KEXGSS_GROUPREQ);
1986+ min = packet_get_int();
1987+ nbits = packet_get_int();
1988+ max = packet_get_int();
1989+ packet_check_eom();
1990+ if (max < min || nbits < min || max < nbits)
1991+ fatal("GSS_GEX, bad parameters: %d !< %d !< %d",
1992+ min, nbits, max);
1993+ dh = PRIVSEP(choose_dh(MAX(DH_GRP_MIN, min),
1994+ nbits, MIN(DH_GRP_MAX, max)));
1995+ if (dh == NULL)
1996+ packet_disconnect("Protocol error: no matching group found");
1997+
1998+ packet_start(SSH2_MSG_KEXGSS_GROUP);
1999+ packet_put_bignum2(dh->p);
2000+ packet_put_bignum2(dh->g);
2001+ packet_send();
2002+
2003+ packet_write_wait();
2004+ break;
2005+ default:
2006+ fatal("%s: Unexpected KEX type %d", __func__, ssh->kex->kex_type);
2007+ }
2008+
2009+ dh_gen_key(dh, ssh->kex->we_need * 8);
2010+
2011+ do {
2012+ debug("Wait SSH2_MSG_GSSAPI_INIT");
2013+ type = packet_read();
2014+ switch(type) {
2015+ case SSH2_MSG_KEXGSS_INIT:
2016+ if (dh_client_pub != NULL)
2017+ fatal("Received KEXGSS_INIT after initialising");
2018+ recv_tok.value = packet_get_string(&slen);
2019+ recv_tok.length = slen;
2020+
2021+ if ((dh_client_pub = BN_new()) == NULL)
2022+ fatal("dh_client_pub == NULL");
2023+
2024+ packet_get_bignum2(dh_client_pub);
2025+
2026+ /* Send SSH_MSG_KEXGSS_HOSTKEY here, if we want */
2027+ break;
2028+ case SSH2_MSG_KEXGSS_CONTINUE:
2029+ recv_tok.value = packet_get_string(&slen);
2030+ recv_tok.length = slen;
2031+ break;
2032+ default:
2033+ packet_disconnect(
2034+ "Protocol error: didn't expect packet type %d",
2035+ type);
2036+ }
2037+
2038+ maj_status = PRIVSEP(ssh_gssapi_accept_ctx(ctxt, &recv_tok,
2039+ &send_tok, &ret_flags));
2040+
2041+ free(recv_tok.value);
2042+
2043+ if (maj_status != GSS_S_COMPLETE && send_tok.length == 0)
2044+ fatal("Zero length token output when incomplete");
2045+
2046+ if (dh_client_pub == NULL)
2047+ fatal("No client public key");
2048+
2049+ if (maj_status & GSS_S_CONTINUE_NEEDED) {
2050+ debug("Sending GSSAPI_CONTINUE");
2051+ packet_start(SSH2_MSG_KEXGSS_CONTINUE);
2052+ packet_put_string(send_tok.value, send_tok.length);
2053+ packet_send();
2054+ gss_release_buffer(&min_status, &send_tok);
2055+ }
2056+ } while (maj_status & GSS_S_CONTINUE_NEEDED);
2057+
2058+ if (GSS_ERROR(maj_status)) {
2059+ if (send_tok.length > 0) {
2060+ packet_start(SSH2_MSG_KEXGSS_CONTINUE);
2061+ packet_put_string(send_tok.value, send_tok.length);
2062+ packet_send();
2063+ }
2064+ fatal("accept_ctx died");
2065+ }
2066+
2067+ if (!(ret_flags & GSS_C_MUTUAL_FLAG))
2068+ fatal("Mutual Authentication flag wasn't set");
2069+
2070+ if (!(ret_flags & GSS_C_INTEG_FLAG))
2071+ fatal("Integrity flag wasn't set");
2072+
2073+ if (!dh_pub_is_valid(dh, dh_client_pub))
2074+ packet_disconnect("bad client public DH value");
2075+
2076+ klen = DH_size(dh);
2077+ kbuf = xmalloc(klen);
2078+ kout = DH_compute_key(kbuf, dh_client_pub, dh);
2079+ if (kout < 0)
2080+ fatal("DH_compute_key: failed");
2081+
2082+ shared_secret = BN_new();
2083+ if (shared_secret == NULL)
2084+ fatal("kexgss_server: BN_new failed");
2085+
2086+ if (BN_bin2bn(kbuf, kout, shared_secret) == NULL)
2087+ fatal("kexgss_server: BN_bin2bn failed");
2088+
2089+ memset(kbuf, 0, klen);
2090+ free(kbuf);
2091+
2092+ hashlen = sizeof(hash);
2093+ switch (ssh->kex->kex_type) {
2094+ case KEX_GSS_GRP1_SHA1:
2095+ case KEX_GSS_GRP14_SHA1:
2096+ kex_dh_hash(
2097+ ssh->kex->hash_alg,
2098+ ssh->kex->client_version_string, ssh->kex->server_version_string,
2099+ buffer_ptr(ssh->kex->peer), buffer_len(ssh->kex->peer),
2100+ buffer_ptr(ssh->kex->my), buffer_len(ssh->kex->my),
2101+ NULL, 0, /* Change this if we start sending host keys */
2102+ dh_client_pub, dh->pub_key, shared_secret,
2103+ hash, &hashlen
2104+ );
2105+ break;
2106+ case KEX_GSS_GEX_SHA1:
2107+ kexgex_hash(
2108+ ssh->kex->hash_alg,
2109+ ssh->kex->client_version_string, ssh->kex->server_version_string,
2110+ buffer_ptr(ssh->kex->peer), buffer_len(ssh->kex->peer),
2111+ buffer_ptr(ssh->kex->my), buffer_len(ssh->kex->my),
2112+ NULL, 0,
2113+ min, nbits, max,
2114+ dh->p, dh->g,
2115+ dh_client_pub,
2116+ dh->pub_key,
2117+ shared_secret,
2118+ hash, &hashlen
2119+ );
2120+ break;
2121+ default:
2122+ fatal("%s: Unexpected KEX type %d", __func__, ssh->kex->kex_type);
2123+ }
2124+
2125+ BN_clear_free(dh_client_pub);
2126+
2127+ if (ssh->kex->session_id == NULL) {
2128+ ssh->kex->session_id_len = hashlen;
2129+ ssh->kex->session_id = xmalloc(ssh->kex->session_id_len);
2130+ memcpy(ssh->kex->session_id, hash, ssh->kex->session_id_len);
2131+ }
2132+
2133+ gssbuf.value = hash;
2134+ gssbuf.length = hashlen;
2135+
2136+ if (GSS_ERROR(PRIVSEP(ssh_gssapi_sign(ctxt,&gssbuf,&msg_tok))))
2137+ fatal("Couldn't get MIC");
2138+
2139+ packet_start(SSH2_MSG_KEXGSS_COMPLETE);
2140+ packet_put_bignum2(dh->pub_key);
2141+ packet_put_string(msg_tok.value,msg_tok.length);
2142+
2143+ if (send_tok.length != 0) {
2144+ packet_put_char(1); /* true */
2145+ packet_put_string(send_tok.value, send_tok.length);
2146+ } else {
2147+ packet_put_char(0); /* false */
2148+ }
2149+ packet_send();
2150+
2151+ gss_release_buffer(&min_status, &send_tok);
2152+ gss_release_buffer(&min_status, &msg_tok);
2153+
2154+ if (gss_kex_context == NULL)
2155+ gss_kex_context = ctxt;
2156+ else
2157+ ssh_gssapi_delete_ctx(&ctxt);
2158+
2159+ DH_free(dh);
2160+
2161+ kex_derive_keys_bn(ssh, hash, hashlen, shared_secret);
2162+ BN_clear_free(shared_secret);
2163+ kex_send_newkeys(ssh);
2164+
2165+ /* If this was a rekey, then save out any delegated credentials we
2166+ * just exchanged. */
2167+ if (options.gss_store_rekey)
2168+ ssh_gssapi_rekey_creds();
2169+ return 0;
2170+}
2171+#endif /* GSSAPI */
2172diff --git a/monitor.c b/monitor.c
2173index c68e1b0d..868fb0d2 100644
2174--- a/monitor.c
2175+++ b/monitor.c
2176@@ -158,6 +158,8 @@ int mm_answer_gss_setup_ctx(int, Buffer *);
2177 int mm_answer_gss_accept_ctx(int, Buffer *);
2178 int mm_answer_gss_userok(int, Buffer *);
2179 int mm_answer_gss_checkmic(int, Buffer *);
2180+int mm_answer_gss_sign(int, Buffer *);
2181+int mm_answer_gss_updatecreds(int, Buffer *);
2182 #endif
2183
2184 #ifdef SSH_AUDIT_EVENTS
2185@@ -232,11 +234,18 @@ struct mon_table mon_dispatch_proto20[] = {
2186 {MONITOR_REQ_GSSSTEP, 0, mm_answer_gss_accept_ctx},
2187 {MONITOR_REQ_GSSUSEROK, MON_ONCE|MON_AUTHDECIDE, mm_answer_gss_userok},
2188 {MONITOR_REQ_GSSCHECKMIC, MON_ONCE, mm_answer_gss_checkmic},
2189+ {MONITOR_REQ_GSSSIGN, MON_ONCE, mm_answer_gss_sign},
2190 #endif
2191 {0, 0, NULL}
2192 };
2193
2194 struct mon_table mon_dispatch_postauth20[] = {
2195+#ifdef GSSAPI
2196+ {MONITOR_REQ_GSSSETUP, 0, mm_answer_gss_setup_ctx},
2197+ {MONITOR_REQ_GSSSTEP, 0, mm_answer_gss_accept_ctx},
2198+ {MONITOR_REQ_GSSSIGN, 0, mm_answer_gss_sign},
2199+ {MONITOR_REQ_GSSUPCREDS, 0, mm_answer_gss_updatecreds},
2200+#endif
2201 #ifdef WITH_OPENSSL
2202 {MONITOR_REQ_MODULI, 0, mm_answer_moduli},
2203 #endif
2204@@ -306,6 +315,10 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
2205 /* Permit requests for moduli and signatures */
2206 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
2207 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
2208+#ifdef GSSAPI
2209+ /* and for the GSSAPI key exchange */
2210+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSETUP, 1);
2211+#endif
2212
2213 /* The first few requests do not require asynchronous access */
2214 while (!authenticated) {
2215@@ -415,6 +428,10 @@ monitor_child_postauth(struct monitor *pmonitor)
2216 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
2217 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
2218 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
2219+#ifdef GSSAPI
2220+ /* and for the GSSAPI key exchange */
2221+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSETUP, 1);
2222+#endif
2223
2224 if (auth_opts->permit_pty_flag) {
2225 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
2226@@ -1652,6 +1669,13 @@ monitor_apply_keystate(struct monitor *pmonitor)
2227 # endif
2228 #endif /* WITH_OPENSSL */
2229 kex->kex[KEX_C25519_SHA256] = kexc25519_server;
2230+#ifdef GSSAPI
2231+ if (options.gss_keyex) {
2232+ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
2233+ kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server;
2234+ kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server;
2235+ }
2236+#endif
2237 kex->load_host_public_key=&get_hostkey_public_by_type;
2238 kex->load_host_private_key=&get_hostkey_private_by_type;
2239 kex->host_key_index=&get_hostkey_index;
2240@@ -1740,8 +1764,8 @@ mm_answer_gss_setup_ctx(int sock, Buffer *m)
2241 OM_uint32 major;
2242 u_int len;
2243
2244- if (!options.gss_authentication)
2245- fatal("%s: GSSAPI authentication not enabled", __func__);
2246+ if (!options.gss_authentication && !options.gss_keyex)
2247+ fatal("%s: GSSAPI not enabled", __func__);
2248
2249 goid.elements = buffer_get_string(m, &len);
2250 goid.length = len;
2251@@ -1770,8 +1794,8 @@ mm_answer_gss_accept_ctx(int sock, Buffer *m)
2252 OM_uint32 flags = 0; /* GSI needs this */
2253 u_int len;
2254
2255- if (!options.gss_authentication)
2256- fatal("%s: GSSAPI authentication not enabled", __func__);
2257+ if (!options.gss_authentication && !options.gss_keyex)
2258+ fatal("%s: GSSAPI not enabled", __func__);
2259
2260 in.value = buffer_get_string(m, &len);
2261 in.length = len;
2262@@ -1790,6 +1814,7 @@ mm_answer_gss_accept_ctx(int sock, Buffer *m)
2263 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0);
2264 monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1);
2265 monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1);
2266+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSIGN, 1);
2267 }
2268 return (0);
2269 }
2270@@ -1801,8 +1826,8 @@ mm_answer_gss_checkmic(int sock, Buffer *m)
2271 OM_uint32 ret;
2272 u_int len;
2273
2274- if (!options.gss_authentication)
2275- fatal("%s: GSSAPI authentication not enabled", __func__);
2276+ if (!options.gss_authentication && !options.gss_keyex)
2277+ fatal("%s: GSSAPI not enabled", __func__);
2278
2279 gssbuf.value = buffer_get_string(m, &len);
2280 gssbuf.length = len;
2281@@ -1831,10 +1856,11 @@ mm_answer_gss_userok(int sock, Buffer *m)
2282 int authenticated;
2283 const char *displayname;
2284
2285- if (!options.gss_authentication)
2286- fatal("%s: GSSAPI authentication not enabled", __func__);
2287+ if (!options.gss_authentication && !options.gss_keyex)
2288+ fatal("%s: GSSAPI not enabled", __func__);
2289
2290- authenticated = authctxt->valid && ssh_gssapi_userok(authctxt->user);
2291+ authenticated = authctxt->valid &&
2292+ ssh_gssapi_userok(authctxt->user, authctxt->pw);
2293
2294 buffer_clear(m);
2295 buffer_put_int(m, authenticated);
2296@@ -1850,5 +1876,76 @@ mm_answer_gss_userok(int sock, Buffer *m)
2297 /* Monitor loop will terminate if authenticated */
2298 return (authenticated);
2299 }
2300+
2301+int
2302+mm_answer_gss_sign(int socket, Buffer *m)
2303+{
2304+ gss_buffer_desc data;
2305+ gss_buffer_desc hash = GSS_C_EMPTY_BUFFER;
2306+ OM_uint32 major, minor;
2307+ u_int len;
2308+
2309+ if (!options.gss_authentication && !options.gss_keyex)
2310+ fatal("%s: GSSAPI not enabled", __func__);
2311+
2312+ data.value = buffer_get_string(m, &len);
2313+ data.length = len;
2314+ if (data.length != 20)
2315+ fatal("%s: data length incorrect: %d", __func__,
2316+ (int) data.length);
2317+
2318+ /* Save the session ID on the first time around */
2319+ if (session_id2_len == 0) {
2320+ session_id2_len = data.length;
2321+ session_id2 = xmalloc(session_id2_len);
2322+ memcpy(session_id2, data.value, session_id2_len);
2323+ }
2324+ major = ssh_gssapi_sign(gsscontext, &data, &hash);
2325+
2326+ free(data.value);
2327+
2328+ buffer_clear(m);
2329+ buffer_put_int(m, major);
2330+ buffer_put_string(m, hash.value, hash.length);
2331+
2332+ mm_request_send(socket, MONITOR_ANS_GSSSIGN, m);
2333+
2334+ gss_release_buffer(&minor, &hash);
2335+
2336+ /* Turn on getpwnam permissions */
2337+ monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1);
2338+
2339+ /* And credential updating, for when rekeying */
2340+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSUPCREDS, 1);
2341+
2342+ return (0);
2343+}
2344+
2345+int
2346+mm_answer_gss_updatecreds(int socket, Buffer *m) {
2347+ ssh_gssapi_ccache store;
2348+ int ok;
2349+
2350+ if (!options.gss_authentication && !options.gss_keyex)
2351+ fatal("%s: GSSAPI not enabled", __func__);
2352+
2353+ store.filename = buffer_get_string(m, NULL);
2354+ store.envvar = buffer_get_string(m, NULL);
2355+ store.envval = buffer_get_string(m, NULL);
2356+
2357+ ok = ssh_gssapi_update_creds(&store);
2358+
2359+ free(store.filename);
2360+ free(store.envvar);
2361+ free(store.envval);
2362+
2363+ buffer_clear(m);
2364+ buffer_put_int(m, ok);
2365+
2366+ mm_request_send(socket, MONITOR_ANS_GSSUPCREDS, m);
2367+
2368+ return(0);
2369+}
2370+
2371 #endif /* GSSAPI */
2372
2373diff --git a/monitor.h b/monitor.h
2374index d68f6745..ec41404c 100644
2375--- a/monitor.h
2376+++ b/monitor.h
2377@@ -65,6 +65,9 @@ enum monitor_reqtype {
2378 MONITOR_REQ_PAM_FREE_CTX = 110, MONITOR_ANS_PAM_FREE_CTX = 111,
2379 MONITOR_REQ_AUDIT_EVENT = 112, MONITOR_REQ_AUDIT_COMMAND = 113,
2380
2381+ MONITOR_REQ_GSSSIGN = 150, MONITOR_ANS_GSSSIGN = 151,
2382+ MONITOR_REQ_GSSUPCREDS = 152, MONITOR_ANS_GSSUPCREDS = 153,
2383+
2384 };
2385
2386 struct monitor {
2387diff --git a/monitor_wrap.c b/monitor_wrap.c
2388index 9666bda4..e749efc1 100644
2389--- a/monitor_wrap.c
2390+++ b/monitor_wrap.c
2391@@ -943,7 +943,7 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
2392 }
2393
2394 int
2395-mm_ssh_gssapi_userok(char *user)
2396+mm_ssh_gssapi_userok(char *user, struct passwd *pw)
2397 {
2398 Buffer m;
2399 int authenticated = 0;
2400@@ -960,5 +960,50 @@ mm_ssh_gssapi_userok(char *user)
2401 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not ");
2402 return (authenticated);
2403 }
2404+
2405+OM_uint32
2406+mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash)
2407+{
2408+ Buffer m;
2409+ OM_uint32 major;
2410+ u_int len;
2411+
2412+ buffer_init(&m);
2413+ buffer_put_string(&m, data->value, data->length);
2414+
2415+ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, &m);
2416+ mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, &m);
2417+
2418+ major = buffer_get_int(&m);
2419+ hash->value = buffer_get_string(&m, &len);
2420+ hash->length = len;
2421+
2422+ buffer_free(&m);
2423+
2424+ return(major);
2425+}
2426+
2427+int
2428+mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store)
2429+{
2430+ Buffer m;
2431+ int ok;
2432+
2433+ buffer_init(&m);
2434+
2435+ buffer_put_cstring(&m, store->filename ? store->filename : "");
2436+ buffer_put_cstring(&m, store->envvar ? store->envvar : "");
2437+ buffer_put_cstring(&m, store->envval ? store->envval : "");
2438+
2439+ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, &m);
2440+ mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, &m);
2441+
2442+ ok = buffer_get_int(&m);
2443+
2444+ buffer_free(&m);
2445+
2446+ return (ok);
2447+}
2448+
2449 #endif /* GSSAPI */
2450
2451diff --git a/monitor_wrap.h b/monitor_wrap.h
2452index 76233270..0970d1f8 100644
2453--- a/monitor_wrap.h
2454+++ b/monitor_wrap.h
2455@@ -60,8 +60,10 @@ int mm_sshkey_verify(const struct sshkey *, const u_char *, size_t,
2456 OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
2457 OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *,
2458 gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *);
2459-int mm_ssh_gssapi_userok(char *user);
2460+int mm_ssh_gssapi_userok(char *user, struct passwd *);
2461 OM_uint32 mm_ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
2462+OM_uint32 mm_ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t);
2463+int mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *);
2464 #endif
2465
2466 #ifdef USE_PAM
2467diff --git a/readconf.c b/readconf.c
2468index 88051db5..c8e79299 100644
2469--- a/readconf.c
2470+++ b/readconf.c
2471@@ -160,6 +160,8 @@ typedef enum {
2472 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
2473 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
2474 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
2475+ oGssTrustDns, oGssKeyEx, oGssClientIdentity, oGssRenewalRekey,
2476+ oGssServerIdentity,
2477 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
2478 oSendEnv, oControlPath, oControlMaster, oControlPersist,
2479 oHashKnownHosts,
2480@@ -199,10 +201,20 @@ static struct {
2481 /* Sometimes-unsupported options */
2482 #if defined(GSSAPI)
2483 { "gssapiauthentication", oGssAuthentication },
2484+ { "gssapikeyexchange", oGssKeyEx },
2485 { "gssapidelegatecredentials", oGssDelegateCreds },
2486+ { "gssapitrustdns", oGssTrustDns },
2487+ { "gssapiclientidentity", oGssClientIdentity },
2488+ { "gssapiserveridentity", oGssServerIdentity },
2489+ { "gssapirenewalforcesrekey", oGssRenewalRekey },
2490 # else
2491 { "gssapiauthentication", oUnsupported },
2492+ { "gssapikeyexchange", oUnsupported },
2493 { "gssapidelegatecredentials", oUnsupported },
2494+ { "gssapitrustdns", oUnsupported },
2495+ { "gssapiclientidentity", oUnsupported },
2496+ { "gssapiserveridentity", oUnsupported },
2497+ { "gssapirenewalforcesrekey", oUnsupported },
2498 #endif
2499 #ifdef ENABLE_PKCS11
2500 { "smartcarddevice", oPKCS11Provider },
2501@@ -950,10 +962,30 @@ parse_time:
2502 intptr = &options->gss_authentication;
2503 goto parse_flag;
2504
2505+ case oGssKeyEx:
2506+ intptr = &options->gss_keyex;
2507+ goto parse_flag;
2508+
2509 case oGssDelegateCreds:
2510 intptr = &options->gss_deleg_creds;
2511 goto parse_flag;
2512
2513+ case oGssTrustDns:
2514+ intptr = &options->gss_trust_dns;
2515+ goto parse_flag;
2516+
2517+ case oGssClientIdentity:
2518+ charptr = &options->gss_client_identity;
2519+ goto parse_string;
2520+
2521+ case oGssServerIdentity:
2522+ charptr = &options->gss_server_identity;
2523+ goto parse_string;
2524+
2525+ case oGssRenewalRekey:
2526+ intptr = &options->gss_renewal_rekey;
2527+ goto parse_flag;
2528+
2529 case oBatchMode:
2530 intptr = &options->batch_mode;
2531 goto parse_flag;
2532@@ -1765,7 +1797,12 @@ initialize_options(Options * options)
2533 options->pubkey_authentication = -1;
2534 options->challenge_response_authentication = -1;
2535 options->gss_authentication = -1;
2536+ options->gss_keyex = -1;
2537 options->gss_deleg_creds = -1;
2538+ options->gss_trust_dns = -1;
2539+ options->gss_renewal_rekey = -1;
2540+ options->gss_client_identity = NULL;
2541+ options->gss_server_identity = NULL;
2542 options->password_authentication = -1;
2543 options->kbd_interactive_authentication = -1;
2544 options->kbd_interactive_devices = NULL;
2545@@ -1906,8 +1943,14 @@ fill_default_options(Options * options)
2546 options->challenge_response_authentication = 1;
2547 if (options->gss_authentication == -1)
2548 options->gss_authentication = 0;
2549+ if (options->gss_keyex == -1)
2550+ options->gss_keyex = 0;
2551 if (options->gss_deleg_creds == -1)
2552 options->gss_deleg_creds = 0;
2553+ if (options->gss_trust_dns == -1)
2554+ options->gss_trust_dns = 0;
2555+ if (options->gss_renewal_rekey == -1)
2556+ options->gss_renewal_rekey = 0;
2557 if (options->password_authentication == -1)
2558 options->password_authentication = 1;
2559 if (options->kbd_interactive_authentication == -1)
2560diff --git a/readconf.h b/readconf.h
2561index f4d9e2b2..f469daaf 100644
2562--- a/readconf.h
2563+++ b/readconf.h
2564@@ -42,7 +42,12 @@ typedef struct {
2565 int challenge_response_authentication;
2566 /* Try S/Key or TIS, authentication. */
2567 int gss_authentication; /* Try GSS authentication */
2568+ int gss_keyex; /* Try GSS key exchange */
2569 int gss_deleg_creds; /* Delegate GSS credentials */
2570+ int gss_trust_dns; /* Trust DNS for GSS canonicalization */
2571+ int gss_renewal_rekey; /* Credential renewal forces rekey */
2572+ char *gss_client_identity; /* Principal to initiate GSSAPI with */
2573+ char *gss_server_identity; /* GSSAPI target principal */
2574 int password_authentication; /* Try password
2575 * authentication. */
2576 int kbd_interactive_authentication; /* Try keyboard-interactive auth. */
2577diff --git a/servconf.c b/servconf.c
2578index 0f0d0906..cbbea05b 100644
2579--- a/servconf.c
2580+++ b/servconf.c
2581@@ -123,8 +123,10 @@ initialize_server_options(ServerOptions *options)
2582 options->kerberos_ticket_cleanup = -1;
2583 options->kerberos_get_afs_token = -1;
2584 options->gss_authentication=-1;
2585+ options->gss_keyex = -1;
2586 options->gss_cleanup_creds = -1;
2587 options->gss_strict_acceptor = -1;
2588+ options->gss_store_rekey = -1;
2589 options->password_authentication = -1;
2590 options->kbd_interactive_authentication = -1;
2591 options->challenge_response_authentication = -1;
2592@@ -315,10 +317,14 @@ fill_default_server_options(ServerOptions *options)
2593 options->kerberos_get_afs_token = 0;
2594 if (options->gss_authentication == -1)
2595 options->gss_authentication = 0;
2596+ if (options->gss_keyex == -1)
2597+ options->gss_keyex = 0;
2598 if (options->gss_cleanup_creds == -1)
2599 options->gss_cleanup_creds = 1;
2600 if (options->gss_strict_acceptor == -1)
2601 options->gss_strict_acceptor = 1;
2602+ if (options->gss_store_rekey == -1)
2603+ options->gss_store_rekey = 0;
2604 if (options->password_authentication == -1)
2605 options->password_authentication = 1;
2606 if (options->kbd_interactive_authentication == -1)
2607@@ -461,6 +467,7 @@ typedef enum {
2608 sHostKeyAlgorithms,
2609 sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile,
2610 sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
2611+ sGssKeyEx, sGssStoreRekey,
2612 sAcceptEnv, sPermitTunnel,
2613 sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
2614 sUsePrivilegeSeparation, sAllowAgentForwarding,
2615@@ -535,12 +542,20 @@ static struct {
2616 #ifdef GSSAPI
2617 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
2618 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
2619+ { "gssapicleanupcreds", sGssCleanupCreds, SSHCFG_GLOBAL },
2620 { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL },
2621+ { "gssapikeyexchange", sGssKeyEx, SSHCFG_GLOBAL },
2622+ { "gssapistorecredentialsonrekey", sGssStoreRekey, SSHCFG_GLOBAL },
2623 #else
2624 { "gssapiauthentication", sUnsupported, SSHCFG_ALL },
2625 { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL },
2626+ { "gssapicleanupcreds", sUnsupported, SSHCFG_GLOBAL },
2627 { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL },
2628+ { "gssapikeyexchange", sUnsupported, SSHCFG_GLOBAL },
2629+ { "gssapistorecredentialsonrekey", sUnsupported, SSHCFG_GLOBAL },
2630 #endif
2631+ { "gssusesessionccache", sUnsupported, SSHCFG_GLOBAL },
2632+ { "gssapiusesessioncredcache", sUnsupported, SSHCFG_GLOBAL },
2633 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
2634 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
2635 { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL },
2636@@ -1407,6 +1422,10 @@ process_server_config_line(ServerOptions *options, char *line,
2637 intptr = &options->gss_authentication;
2638 goto parse_flag;
2639
2640+ case sGssKeyEx:
2641+ intptr = &options->gss_keyex;
2642+ goto parse_flag;
2643+
2644 case sGssCleanupCreds:
2645 intptr = &options->gss_cleanup_creds;
2646 goto parse_flag;
2647@@ -1415,6 +1434,10 @@ process_server_config_line(ServerOptions *options, char *line,
2648 intptr = &options->gss_strict_acceptor;
2649 goto parse_flag;
2650
2651+ case sGssStoreRekey:
2652+ intptr = &options->gss_store_rekey;
2653+ goto parse_flag;
2654+
2655 case sPasswordAuthentication:
2656 intptr = &options->password_authentication;
2657 goto parse_flag;
2658@@ -2453,7 +2476,10 @@ dump_config(ServerOptions *o)
2659 #endif
2660 #ifdef GSSAPI
2661 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication);
2662+ dump_cfg_fmtint(sGssKeyEx, o->gss_keyex);
2663 dump_cfg_fmtint(sGssCleanupCreds, o->gss_cleanup_creds);
2664+ dump_cfg_fmtint(sGssStrictAcceptor, o->gss_strict_acceptor);
2665+ dump_cfg_fmtint(sGssStoreRekey, o->gss_store_rekey);
2666 #endif
2667 dump_cfg_fmtint(sPasswordAuthentication, o->password_authentication);
2668 dump_cfg_fmtint(sKbdInteractiveAuthentication,
2669diff --git a/servconf.h b/servconf.h
2670index 37a0fb1a..5dfc9bc0 100644
2671--- a/servconf.h
2672+++ b/servconf.h
2673@@ -130,8 +130,10 @@ typedef struct {
2674 int kerberos_get_afs_token; /* If true, try to get AFS token if
2675 * authenticated with Kerberos. */
2676 int gss_authentication; /* If true, permit GSSAPI authentication */
2677+ int gss_keyex; /* If true, permit GSSAPI key exchange */
2678 int gss_cleanup_creds; /* If true, destroy cred cache on logout */
2679 int gss_strict_acceptor; /* If true, restrict the GSSAPI acceptor name */
2680+ int gss_store_rekey;
2681 int password_authentication; /* If true, permit password
2682 * authentication. */
2683 int kbd_interactive_authentication; /* If true, permit */
2684diff --git a/ssh-gss.h b/ssh-gss.h
2685index 6593e422..919660a0 100644
2686--- a/ssh-gss.h
2687+++ b/ssh-gss.h
2688@@ -1,6 +1,6 @@
2689 /* $OpenBSD: ssh-gss.h,v 1.12 2017/06/24 06:34:38 djm Exp $ */
2690 /*
2691- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
2692+ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
2693 *
2694 * Redistribution and use in source and binary forms, with or without
2695 * modification, are permitted provided that the following conditions
2696@@ -61,10 +61,22 @@
2697
2698 #define SSH_GSS_OIDTYPE 0x06
2699
2700+#define SSH2_MSG_KEXGSS_INIT 30
2701+#define SSH2_MSG_KEXGSS_CONTINUE 31
2702+#define SSH2_MSG_KEXGSS_COMPLETE 32
2703+#define SSH2_MSG_KEXGSS_HOSTKEY 33
2704+#define SSH2_MSG_KEXGSS_ERROR 34
2705+#define SSH2_MSG_KEXGSS_GROUPREQ 40
2706+#define SSH2_MSG_KEXGSS_GROUP 41
2707+#define KEX_GSS_GRP1_SHA1_ID "gss-group1-sha1-"
2708+#define KEX_GSS_GRP14_SHA1_ID "gss-group14-sha1-"
2709+#define KEX_GSS_GEX_SHA1_ID "gss-gex-sha1-"
2710+
2711 typedef struct {
2712 char *filename;
2713 char *envvar;
2714 char *envval;
2715+ struct passwd *owner;
2716 void *data;
2717 } ssh_gssapi_ccache;
2718
2719@@ -72,8 +84,11 @@ typedef struct {
2720 gss_buffer_desc displayname;
2721 gss_buffer_desc exportedname;
2722 gss_cred_id_t creds;
2723+ gss_name_t name;
2724 struct ssh_gssapi_mech_struct *mech;
2725 ssh_gssapi_ccache store;
2726+ int used;
2727+ int updated;
2728 } ssh_gssapi_client;
2729
2730 typedef struct ssh_gssapi_mech_struct {
2731@@ -84,6 +99,7 @@ typedef struct ssh_gssapi_mech_struct {
2732 int (*userok) (ssh_gssapi_client *, char *);
2733 int (*localname) (ssh_gssapi_client *, char **);
2734 void (*storecreds) (ssh_gssapi_client *);
2735+ int (*updatecreds) (ssh_gssapi_ccache *, ssh_gssapi_client *);
2736 } ssh_gssapi_mech;
2737
2738 typedef struct {
2739@@ -94,10 +110,11 @@ typedef struct {
2740 gss_OID oid; /* client */
2741 gss_cred_id_t creds; /* server */
2742 gss_name_t client; /* server */
2743- gss_cred_id_t client_creds; /* server */
2744+ gss_cred_id_t client_creds; /* both */
2745 } Gssctxt;
2746
2747 extern ssh_gssapi_mech *supported_mechs[];
2748+extern Gssctxt *gss_kex_context;
2749
2750 int ssh_gssapi_check_oid(Gssctxt *, void *, size_t);
2751 void ssh_gssapi_set_oid_data(Gssctxt *, void *, size_t);
2752@@ -119,17 +136,33 @@ void ssh_gssapi_build_ctx(Gssctxt **);
2753 void ssh_gssapi_delete_ctx(Gssctxt **);
2754 OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t);
2755 void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *);
2756-int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *);
2757+int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *, const char *);
2758+OM_uint32 ssh_gssapi_client_identity(Gssctxt *, const char *);
2759+int ssh_gssapi_credentials_updated(Gssctxt *);
2760
2761 /* In the server */
2762+typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *,
2763+ const char *);
2764+char *ssh_gssapi_client_mechanisms(const char *, const char *);
2765+char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *,
2766+ const char *);
2767+gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int);
2768+int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *,
2769+ const char *);
2770 OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
2771-int ssh_gssapi_userok(char *name);
2772+int ssh_gssapi_userok(char *name, struct passwd *);
2773 OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t);
2774 void ssh_gssapi_do_child(char ***, u_int *);
2775 void ssh_gssapi_cleanup_creds(void);
2776 void ssh_gssapi_storecreds(void);
2777 const char *ssh_gssapi_displayname(void);
2778
2779+char *ssh_gssapi_server_mechanisms(void);
2780+int ssh_gssapi_oid_table_ok(void);
2781+
2782+int ssh_gssapi_update_creds(ssh_gssapi_ccache *store);
2783+void ssh_gssapi_rekey_creds(void);
2784+
2785 #endif /* GSSAPI */
2786
2787 #endif /* _SSH_GSS_H */
2788diff --git a/ssh_config b/ssh_config
2789index c12f5ef5..bcb9f153 100644
2790--- a/ssh_config
2791+++ b/ssh_config
2792@@ -24,6 +24,8 @@
2793 # HostbasedAuthentication no
2794 # GSSAPIAuthentication no
2795 # GSSAPIDelegateCredentials no
2796+# GSSAPIKeyExchange no
2797+# GSSAPITrustDNS no
2798 # BatchMode no
2799 # CheckHostIP yes
2800 # AddressFamily any
2801diff --git a/ssh_config.5 b/ssh_config.5
2802index 71705cab..66826aa7 100644
2803--- a/ssh_config.5
2804+++ b/ssh_config.5
2805@@ -727,10 +727,42 @@ The default is
2806 Specifies whether user authentication based on GSSAPI is allowed.
2807 The default is
2808 .Cm no .
2809+.It Cm GSSAPIKeyExchange
2810+Specifies whether key exchange based on GSSAPI may be used. When using
2811+GSSAPI key exchange the server need not have a host key.
2812+The default is
2813+.Cm no .
2814+.It Cm GSSAPIClientIdentity
2815+If set, specifies the GSSAPI client identity that ssh should use when
2816+connecting to the server. The default is unset, which means that the default
2817+identity will be used.
2818+.It Cm GSSAPIServerIdentity
2819+If set, specifies the GSSAPI server identity that ssh should expect when
2820+connecting to the server. The default is unset, which means that the
2821+expected GSSAPI server identity will be determined from the target
2822+hostname.
2823 .It Cm GSSAPIDelegateCredentials
2824 Forward (delegate) credentials to the server.
2825 The default is
2826 .Cm no .
2827+.It Cm GSSAPIRenewalForcesRekey
2828+If set to
2829+.Cm yes
2830+then renewal of the client's GSSAPI credentials will force the rekeying of the
2831+ssh connection. With a compatible server, this can delegate the renewed
2832+credentials to a session on the server.
2833+The default is
2834+.Cm no .
2835+.It Cm GSSAPITrustDns
2836+Set to
2837+.Cm yes
2838+to indicate that the DNS is trusted to securely canonicalize
2839+the name of the host being connected to. If
2840+.Cm no ,
2841+the hostname entered on the
2842+command line will be passed untouched to the GSSAPI library.
2843+The default is
2844+.Cm no .
2845 .It Cm HashKnownHosts
2846 Indicates that
2847 .Xr ssh 1
2848diff --git a/sshconnect2.c b/sshconnect2.c
2849index 1f4a74cf..83562c68 100644
2850--- a/sshconnect2.c
2851+++ b/sshconnect2.c
2852@@ -162,6 +162,11 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
2853 struct kex *kex;
2854 int r;
2855
2856+#ifdef GSSAPI
2857+ char *orig = NULL, *gss = NULL;
2858+ char *gss_host = NULL;
2859+#endif
2860+
2861 xxx_host = host;
2862 xxx_hostaddr = hostaddr;
2863
2864@@ -192,6 +197,35 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
2865 order_hostkeyalgs(host, hostaddr, port));
2866 }
2867
2868+#ifdef GSSAPI
2869+ if (options.gss_keyex) {
2870+ /* Add the GSSAPI mechanisms currently supported on this
2871+ * client to the key exchange algorithm proposal */
2872+ orig = myproposal[PROPOSAL_KEX_ALGS];
2873+
2874+ if (options.gss_server_identity)
2875+ gss_host = xstrdup(options.gss_server_identity);
2876+ else if (options.gss_trust_dns)
2877+ gss_host = remote_hostname(active_state);
2878+ else
2879+ gss_host = xstrdup(host);
2880+
2881+ gss = ssh_gssapi_client_mechanisms(gss_host,
2882+ options.gss_client_identity);
2883+ if (gss) {
2884+ debug("Offering GSSAPI proposal: %s", gss);
2885+ xasprintf(&myproposal[PROPOSAL_KEX_ALGS],
2886+ "%s,%s", gss, orig);
2887+
2888+ /* If we've got GSSAPI algorithms, then we also
2889+ * support the 'null' hostkey, as a last resort */
2890+ orig = myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS];
2891+ xasprintf(&myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS],
2892+ "%s,null", orig);
2893+ }
2894+ }
2895+#endif
2896+
2897 if (options.rekey_limit || options.rekey_interval)
2898 packet_set_rekey_limits(options.rekey_limit,
2899 options.rekey_interval);
2900@@ -213,15 +247,41 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
2901 # endif
2902 #endif
2903 kex->kex[KEX_C25519_SHA256] = kexc25519_client;
2904+#ifdef GSSAPI
2905+ if (options.gss_keyex) {
2906+ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
2907+ kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_client;
2908+ kex->kex[KEX_GSS_GEX_SHA1] = kexgss_client;
2909+ }
2910+#endif
2911 kex->client_version_string=client_version_string;
2912 kex->server_version_string=server_version_string;
2913 kex->verify_host_key=&verify_host_key_callback;
2914
2915+#ifdef GSSAPI
2916+ if (options.gss_keyex) {
2917+ kex->gss_deleg_creds = options.gss_deleg_creds;
2918+ kex->gss_trust_dns = options.gss_trust_dns;
2919+ kex->gss_client = options.gss_client_identity;
2920+ kex->gss_host = gss_host;
2921+ }
2922+#endif
2923+
2924 ssh_dispatch_run_fatal(active_state, DISPATCH_BLOCK, &kex->done);
2925
2926 /* remove ext-info from the KEX proposals for rekeying */
2927 myproposal[PROPOSAL_KEX_ALGS] =
2928 compat_kex_proposal(options.kex_algorithms);
2929+#ifdef GSSAPI
2930+ /* repair myproposal after it was crumpled by the */
2931+ /* ext-info removal above */
2932+ if (gss) {
2933+ orig = myproposal[PROPOSAL_KEX_ALGS];
2934+ xasprintf(&myproposal[PROPOSAL_KEX_ALGS],
2935+ "%s,%s", gss, orig);
2936+ free(gss);
2937+ }
2938+#endif
2939 if ((r = kex_prop2buf(kex->my, myproposal)) != 0)
2940 fatal("kex_prop2buf: %s", ssh_err(r));
2941
2942@@ -311,6 +371,7 @@ int input_gssapi_token(int type, u_int32_t, struct ssh *);
2943 int input_gssapi_hash(int type, u_int32_t, struct ssh *);
2944 int input_gssapi_error(int, u_int32_t, struct ssh *);
2945 int input_gssapi_errtok(int, u_int32_t, struct ssh *);
2946+int userauth_gsskeyex(Authctxt *authctxt);
2947 #endif
2948
2949 void userauth(Authctxt *, char *);
2950@@ -327,6 +388,11 @@ static char *authmethods_get(void);
2951
2952 Authmethod authmethods[] = {
2953 #ifdef GSSAPI
2954+ {"gssapi-keyex",
2955+ userauth_gsskeyex,
2956+ NULL,
2957+ &options.gss_authentication,
2958+ NULL},
2959 {"gssapi-with-mic",
2960 userauth_gssapi,
2961 NULL,
2962@@ -643,25 +709,40 @@ userauth_gssapi(Authctxt *authctxt)
2963 static u_int mech = 0;
2964 OM_uint32 min;
2965 int ok = 0;
2966+ char *gss_host;
2967+
2968+ if (options.gss_server_identity)
2969+ gss_host = xstrdup(options.gss_server_identity);
2970+ else if (options.gss_trust_dns)
2971+ gss_host = remote_hostname(active_state);
2972+ else
2973+ gss_host = xstrdup(authctxt->host);
2974
2975 /* Try one GSSAPI method at a time, rather than sending them all at
2976 * once. */
2977
2978 if (gss_supported == NULL)
2979- gss_indicate_mechs(&min, &gss_supported);
2980+ if (GSS_ERROR(gss_indicate_mechs(&min, &gss_supported))) {
2981+ gss_supported = NULL;
2982+ free(gss_host);
2983+ return 0;
2984+ }
2985
2986 /* Check to see if the mechanism is usable before we offer it */
2987 while (mech < gss_supported->count && !ok) {
2988 /* My DER encoding requires length<128 */
2989 if (gss_supported->elements[mech].length < 128 &&
2990 ssh_gssapi_check_mechanism(&gssctxt,
2991- &gss_supported->elements[mech], authctxt->host)) {
2992+ &gss_supported->elements[mech], gss_host,
2993+ options.gss_client_identity)) {
2994 ok = 1; /* Mechanism works */
2995 } else {
2996 mech++;
2997 }
2998 }
2999
3000+ free(gss_host);
3001+
3002 if (!ok)
3003 return 0;
3004
3005@@ -752,8 +833,8 @@ input_gssapi_response(int type, u_int32_t plen, struct ssh *ssh)
3006 {
3007 Authctxt *authctxt = ssh->authctxt;
3008 Gssctxt *gssctxt;
3009- int oidlen;
3010- char *oidv;
3011+ u_int oidlen;
3012+ u_char *oidv;
3013
3014 if (authctxt == NULL)
3015 fatal("input_gssapi_response: no authentication context");
3016@@ -866,6 +947,48 @@ input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh)
3017 free(lang);
3018 return 0;
3019 }
3020+
3021+int
3022+userauth_gsskeyex(Authctxt *authctxt)
3023+{
3024+ Buffer b;
3025+ gss_buffer_desc gssbuf;
3026+ gss_buffer_desc mic = GSS_C_EMPTY_BUFFER;
3027+ OM_uint32 ms;
3028+
3029+ static int attempt = 0;
3030+ if (attempt++ >= 1)
3031+ return (0);
3032+
3033+ if (gss_kex_context == NULL) {
3034+ debug("No valid Key exchange context");
3035+ return (0);
3036+ }
3037+
3038+ ssh_gssapi_buildmic(&b, authctxt->server_user, authctxt->service,
3039+ "gssapi-keyex");
3040+
3041+ gssbuf.value = buffer_ptr(&b);
3042+ gssbuf.length = buffer_len(&b);
3043+
3044+ if (GSS_ERROR(ssh_gssapi_sign(gss_kex_context, &gssbuf, &mic))) {
3045+ buffer_free(&b);
3046+ return (0);
3047+ }
3048+
3049+ packet_start(SSH2_MSG_USERAUTH_REQUEST);
3050+ packet_put_cstring(authctxt->server_user);
3051+ packet_put_cstring(authctxt->service);
3052+ packet_put_cstring(authctxt->method->name);
3053+ packet_put_string(mic.value, mic.length);
3054+ packet_send();
3055+
3056+ buffer_free(&b);
3057+ gss_release_buffer(&ms, &mic);
3058+
3059+ return (1);
3060+}
3061+
3062 #endif /* GSSAPI */
3063
3064 int
3065diff --git a/sshd.c b/sshd.c
3066index fd95b681..e88185ef 100644
3067--- a/sshd.c
3068+++ b/sshd.c
3069@@ -123,6 +123,10 @@
3070 #include "version.h"
3071 #include "ssherr.h"
3072
3073+#ifdef USE_SECURITY_SESSION_API
3074+#include <Security/AuthSession.h>
3075+#endif
3076+
3077 /* Re-exec fds */
3078 #define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1)
3079 #define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2)
3080@@ -531,7 +535,7 @@ privsep_preauth_child(void)
3081
3082 #ifdef GSSAPI
3083 /* Cache supported mechanism OIDs for later use */
3084- if (options.gss_authentication)
3085+ if (options.gss_authentication || options.gss_keyex)
3086 ssh_gssapi_prepare_supported_oids();
3087 #endif
3088
3089@@ -1753,10 +1757,13 @@ main(int ac, char **av)
3090 key ? "private" : "agent", i, sshkey_ssh_name(pubkey), fp);
3091 free(fp);
3092 }
3093+#ifndef GSSAPI
3094+ /* The GSSAPI key exchange can run without a host key */
3095 if (!sensitive_data.have_ssh2_key) {
3096 logit("sshd: no hostkeys available -- exiting.");
3097 exit(1);
3098 }
3099+#endif
3100
3101 /*
3102 * Load certificates. They are stored in an array at identical
3103@@ -2047,6 +2054,60 @@ main(int ac, char **av)
3104 rdomain == NULL ? "" : "\"");
3105 free(laddr);
3106
3107+#ifdef USE_SECURITY_SESSION_API
3108+ /*
3109+ * Create a new security session for use by the new user login if
3110+ * the current session is the root session or we are not launched
3111+ * by inetd (eg: debugging mode or server mode). We do not
3112+ * necessarily need to create a session if we are launched from
3113+ * inetd because Panther xinetd will create a session for us.
3114+ *
3115+ * The only case where this logic will fail is if there is an
3116+ * inetd running in a non-root session which is not creating
3117+ * new sessions for us. Then all the users will end up in the
3118+ * same session (bad).
3119+ *
3120+ * When the client exits, the session will be destroyed for us
3121+ * automatically.
3122+ *
3123+ * We must create the session before any credentials are stored
3124+ * (including AFS pags, which happens a few lines below).
3125+ */
3126+ {
3127+ OSStatus err = 0;
3128+ SecuritySessionId sid = 0;
3129+ SessionAttributeBits sattrs = 0;
3130+
3131+ err = SessionGetInfo(callerSecuritySession, &sid, &sattrs);
3132+ if (err)
3133+ error("SessionGetInfo() failed with error %.8X",
3134+ (unsigned) err);
3135+ else
3136+ debug("Current Session ID is %.8X / Session Attributes are %.8X",
3137+ (unsigned) sid, (unsigned) sattrs);
3138+
3139+ if (inetd_flag && !(sattrs & sessionIsRoot))
3140+ debug("Running in inetd mode in a non-root session... "
3141+ "assuming inetd created the session for us.");
3142+ else {
3143+ debug("Creating new security session...");
3144+ err = SessionCreate(0, sessionHasTTY | sessionIsRemote);
3145+ if (err)
3146+ error("SessionCreate() failed with error %.8X",
3147+ (unsigned) err);
3148+
3149+ err = SessionGetInfo(callerSecuritySession, &sid,
3150+ &sattrs);
3151+ if (err)
3152+ error("SessionGetInfo() failed with error %.8X",
3153+ (unsigned) err);
3154+ else
3155+ debug("New Session ID is %.8X / Session Attributes are %.8X",
3156+ (unsigned) sid, (unsigned) sattrs);
3157+ }
3158+ }
3159+#endif
3160+
3161 /*
3162 * We don't want to listen forever unless the other side
3163 * successfully authenticates itself. So we set up an alarm which is
3164@@ -2234,6 +2295,48 @@ do_ssh2_kex(void)
3165 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal(
3166 list_hostkey_types());
3167
3168+#ifdef GSSAPI
3169+ {
3170+ char *orig;
3171+ char *gss = NULL;
3172+ char *newstr = NULL;
3173+ orig = myproposal[PROPOSAL_KEX_ALGS];
3174+
3175+ /*
3176+ * If we don't have a host key, then there's no point advertising
3177+ * the other key exchange algorithms
3178+ */
3179+
3180+ if (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]) == 0)
3181+ orig = NULL;
3182+
3183+ if (options.gss_keyex)
3184+ gss = ssh_gssapi_server_mechanisms();
3185+ else
3186+ gss = NULL;
3187+
3188+ if (gss && orig)
3189+ xasprintf(&newstr, "%s,%s", gss, orig);
3190+ else if (gss)
3191+ newstr = gss;
3192+ else if (orig)
3193+ newstr = orig;
3194+
3195+ /*
3196+ * If we've got GSSAPI mechanisms, then we've got the 'null' host
3197+ * key alg, but we can't tell people about it unless its the only
3198+ * host key algorithm we support
3199+ */
3200+ if (gss && (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS])) == 0)
3201+ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = "null";
3202+
3203+ if (newstr)
3204+ myproposal[PROPOSAL_KEX_ALGS] = newstr;
3205+ else
3206+ fatal("No supported key exchange algorithms");
3207+ }
3208+#endif
3209+
3210 /* start key exchange */
3211 if ((r = kex_setup(active_state, myproposal)) != 0)
3212 fatal("kex_setup: %s", ssh_err(r));
3213@@ -2251,6 +2354,13 @@ do_ssh2_kex(void)
3214 # endif
3215 #endif
3216 kex->kex[KEX_C25519_SHA256] = kexc25519_server;
3217+#ifdef GSSAPI
3218+ if (options.gss_keyex) {
3219+ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
3220+ kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server;
3221+ kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server;
3222+ }
3223+#endif
3224 kex->server = 1;
3225 kex->client_version_string=client_version_string;
3226 kex->server_version_string=server_version_string;
3227diff --git a/sshd_config b/sshd_config
3228index 3109d5d7..86263d71 100644
3229--- a/sshd_config
3230+++ b/sshd_config
3231@@ -69,6 +69,8 @@ AuthorizedKeysFile .ssh/authorized_keys
3232 # GSSAPI options
3233 #GSSAPIAuthentication no
3234 #GSSAPICleanupCredentials yes
3235+#GSSAPIStrictAcceptorCheck yes
3236+#GSSAPIKeyExchange no
3237
3238 # Set this to 'yes' to enable PAM authentication, account processing,
3239 # and session processing. If this is enabled, PAM authentication will
3240diff --git a/sshd_config.5 b/sshd_config.5
3241index e3c7c393..c4a3f3cb 100644
3242--- a/sshd_config.5
3243+++ b/sshd_config.5
3244@@ -636,6 +636,11 @@ The default is
3245 Specifies whether user authentication based on GSSAPI is allowed.
3246 The default is
3247 .Cm no .
3248+.It Cm GSSAPIKeyExchange
3249+Specifies whether key exchange based on GSSAPI is allowed. GSSAPI key exchange
3250+doesn't rely on ssh keys to verify host identity.
3251+The default is
3252+.Cm no .
3253 .It Cm GSSAPICleanupCredentials
3254 Specifies whether to automatically destroy the user's credentials cache
3255 on logout.
3256@@ -655,6 +660,11 @@ machine's default store.
3257 This facility is provided to assist with operation on multi homed machines.
3258 The default is
3259 .Cm yes .
3260+.It Cm GSSAPIStoreCredentialsOnRekey
3261+Controls whether the user's GSSAPI credentials should be updated following a
3262+successful connection rekeying. This option can be used to accepted renewed
3263+or updated credentials from a compatible client. The default is
3264+.Cm no .
3265 .It Cm HostbasedAcceptedKeyTypes
3266 Specifies the key types that will be accepted for hostbased authentication
3267 as a comma-separated pattern list.
3268diff --git a/sshkey.c b/sshkey.c
3269index 7712fba2..08887286 100644
3270--- a/sshkey.c
3271+++ b/sshkey.c
3272@@ -122,6 +122,7 @@ static const struct keytype keytypes[] = {
3273 # endif /* OPENSSL_HAS_NISTP521 */
3274 # endif /* OPENSSL_HAS_ECC */
3275 #endif /* WITH_OPENSSL */
3276+ { "null", "null", KEY_NULL, 0, 0, 0 },
3277 { NULL, NULL, -1, -1, 0, 0 }
3278 };
3279
3280@@ -210,7 +211,7 @@ sshkey_alg_list(int certs_only, int plain_only, int include_sigonly, char sep)
3281 const struct keytype *kt;
3282
3283 for (kt = keytypes; kt->type != -1; kt++) {
3284- if (kt->name == NULL)
3285+ if (kt->name == NULL || kt->type == KEY_NULL)
3286 continue;
3287 if (!include_sigonly && kt->sigonly)
3288 continue;
3289diff --git a/sshkey.h b/sshkey.h
3290index 155cd45a..4e89049f 100644
3291--- a/sshkey.h
3292+++ b/sshkey.h
3293@@ -63,6 +63,7 @@ enum sshkey_types {
3294 KEY_ED25519_CERT,
3295 KEY_XMSS,
3296 KEY_XMSS_CERT,
3297+ KEY_NULL,
3298 KEY_UNSPEC
3299 };
3300
diff --git a/debian/patches/keepalive-extensions.patch b/debian/patches/keepalive-extensions.patch
new file mode 100644
index 000000000..68fa28e5c
--- /dev/null
+++ b/debian/patches/keepalive-extensions.patch
@@ -0,0 +1,134 @@
1From a7045c36e6e072c8f9250fbe11cf2f9db9f51a08 Mon Sep 17 00:00:00 2001
2From: Richard Kettlewell <rjk@greenend.org.uk>
3Date: Sun, 9 Feb 2014 16:09:52 +0000
4Subject: Various keepalive extensions
5
6Add compatibility aliases for ProtocolKeepAlives and SetupTimeOut, supported
7in previous versions of Debian's OpenSSH package but since superseded by
8ServerAliveInterval. (We're probably stuck with this bit for
9compatibility.)
10
11In batch mode, default ServerAliveInterval to five minutes.
12
13Adjust documentation to match and to give some more advice on use of
14keepalives.
15
16Author: Ian Jackson <ian@chiark.greenend.org.uk>
17Author: Matthew Vernon <matthew@debian.org>
18Author: Colin Watson <cjwatson@debian.org>
19Last-Update: 2017-10-04
20
21Patch-Name: keepalive-extensions.patch
22---
23 readconf.c | 14 ++++++++++++--
24 ssh_config.5 | 21 +++++++++++++++++++--
25 sshd_config.5 | 3 +++
26 3 files changed, 34 insertions(+), 4 deletions(-)
27
28diff --git a/readconf.c b/readconf.c
29index 1f1be778..7f2b5c17 100644
30--- a/readconf.c
31+++ b/readconf.c
32@@ -174,6 +174,7 @@ typedef enum {
33 oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,
34 oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes,
35 oPubkeyAcceptedKeyTypes, oProxyJump,
36+ oProtocolKeepAlives, oSetupTimeOut,
37 oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported
38 } OpCodes;
39
40@@ -319,6 +320,8 @@ static struct {
41 { "pubkeyacceptedkeytypes", oPubkeyAcceptedKeyTypes },
42 { "ignoreunknown", oIgnoreUnknown },
43 { "proxyjump", oProxyJump },
44+ { "protocolkeepalives", oProtocolKeepAlives },
45+ { "setuptimeout", oSetupTimeOut },
46
47 { NULL, oBadOption }
48 };
49@@ -1378,6 +1381,8 @@ parse_keytypes:
50 goto parse_flag;
51
52 case oServerAliveInterval:
53+ case oProtocolKeepAlives: /* Debian-specific compatibility alias */
54+ case oSetupTimeOut: /* Debian-specific compatibility alias */
55 intptr = &options->server_alive_interval;
56 goto parse_time;
57
58@@ -2019,8 +2024,13 @@ fill_default_options(Options * options)
59 options->rekey_interval = 0;
60 if (options->verify_host_key_dns == -1)
61 options->verify_host_key_dns = 0;
62- if (options->server_alive_interval == -1)
63- options->server_alive_interval = 0;
64+ if (options->server_alive_interval == -1) {
65+ /* in batch mode, default is 5mins */
66+ if (options->batch_mode == 1)
67+ options->server_alive_interval = 300;
68+ else
69+ options->server_alive_interval = 0;
70+ }
71 if (options->server_alive_count_max == -1)
72 options->server_alive_count_max = 3;
73 if (options->control_master == -1)
74diff --git a/ssh_config.5 b/ssh_config.5
75index 66826aa7..32c3632c 100644
76--- a/ssh_config.5
77+++ b/ssh_config.5
78@@ -247,8 +247,12 @@ Valid arguments are
79 If set to
80 .Cm yes ,
81 passphrase/password querying will be disabled.
82+In addition, the
83+.Cm ServerAliveInterval
84+option will be set to 300 seconds by default (Debian-specific).
85 This option is useful in scripts and other batch jobs where no user
86-is present to supply the password.
87+is present to supply the password,
88+and where it is desirable to detect a broken network swiftly.
89 The argument must be
90 .Cm yes
91 or
92@@ -1463,7 +1467,14 @@ from the server,
93 will send a message through the encrypted
94 channel to request a response from the server.
95 The default
96-is 0, indicating that these messages will not be sent to the server.
97+is 0, indicating that these messages will not be sent to the server,
98+or 300 if the
99+.Cm BatchMode
100+option is set (Debian-specific).
101+.Cm ProtocolKeepAlives
102+and
103+.Cm SetupTimeOut
104+are Debian-specific compatibility aliases for this option.
105 .It Cm StreamLocalBindMask
106 Sets the octal file creation mode mask
107 .Pq umask
108@@ -1537,6 +1548,12 @@ Specifies whether the system should send TCP keepalive messages to the
109 other side.
110 If they are sent, death of the connection or crash of one
111 of the machines will be properly noticed.
112+This option only uses TCP keepalives (as opposed to using ssh level
113+keepalives), so takes a long time to notice when the connection dies.
114+As such, you probably want
115+the
116+.Cm ServerAliveInterval
117+option as well.
118 However, this means that
119 connections will die if the route is down temporarily, and some people
120 find it annoying.
121diff --git a/sshd_config.5 b/sshd_config.5
122index c4a3f3cb..1a1c6dd0 100644
123--- a/sshd_config.5
124+++ b/sshd_config.5
125@@ -1495,6 +1495,9 @@ This avoids infinitely hanging sessions.
126 .Pp
127 To disable TCP keepalive messages, the value should be set to
128 .Cm no .
129+.Pp
130+This option was formerly called
131+.Cm KeepAlive .
132 .It Cm TrustedUserCAKeys
133 Specifies a file containing public keys of certificate authorities that are
134 trusted to sign user certificates for authentication, or
diff --git a/debian/patches/mention-ssh-keygen-on-keychange.patch b/debian/patches/mention-ssh-keygen-on-keychange.patch
new file mode 100644
index 000000000..542b42ae9
--- /dev/null
+++ b/debian/patches/mention-ssh-keygen-on-keychange.patch
@@ -0,0 +1,44 @@
1From 76ab788bcf265360e1b88f8ced6085198c320fdd Mon Sep 17 00:00:00 2001
2From: Scott Moser <smoser@ubuntu.com>
3Date: Sun, 9 Feb 2014 16:10:03 +0000
4Subject: Mention ssh-keygen in ssh fingerprint changed warning
5
6Author: Chris Lamb <lamby@debian.org>
7Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843
8Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607
9Last-Update: 2017-08-22
10
11Patch-Name: mention-ssh-keygen-on-keychange.patch
12---
13 sshconnect.c | 9 ++++++++-
14 1 file changed, 8 insertions(+), 1 deletion(-)
15
16diff --git a/sshconnect.c b/sshconnect.c
17index 8ab01c0e..58f9eac8 100644
18--- a/sshconnect.c
19+++ b/sshconnect.c
20@@ -1141,9 +1141,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
21 error("%s. This could either mean that", key_msg);
22 error("DNS SPOOFING is happening or the IP address for the host");
23 error("and its host key have changed at the same time.");
24- if (ip_status != HOST_NEW)
25+ if (ip_status != HOST_NEW) {
26 error("Offending key for IP in %s:%lu",
27 ip_found->file, ip_found->line);
28+ error(" remove with:");
29+ error(" ssh-keygen -f \"%s\" -R \"%s\"",
30+ ip_found->file, ip);
31+ }
32 }
33 /* The host key has changed. */
34 warn_changed_key(host_key);
35@@ -1152,6 +1156,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
36 error("Offending %s key in %s:%lu",
37 sshkey_type(host_found->key),
38 host_found->file, host_found->line);
39+ error(" remove with:");
40+ error(" ssh-keygen -f \"%s\" -R \"%s\"",
41+ host_found->file, host);
42
43 /*
44 * If strict host key checking is in use, the user will have
diff --git a/debian/patches/no-openssl-version-status.patch b/debian/patches/no-openssl-version-status.patch
new file mode 100644
index 000000000..f6646ca20
--- /dev/null
+++ b/debian/patches/no-openssl-version-status.patch
@@ -0,0 +1,62 @@
1From 7cdc2be2d56f5f49c9f2557d056bf2c15a141a79 Mon Sep 17 00:00:00 2001
2From: Kurt Roeckx <kurt@roeckx.be>
3Date: Sun, 9 Feb 2014 16:10:14 +0000
4Subject: Don't check the status field of the OpenSSL version
5
6There is no reason to check the version of OpenSSL (in Debian). If it's
7not compatible the soname will change. OpenSSH seems to want to do a
8check for the soname based on the version number, but wants to keep the
9status of the release the same. Remove that check on the status since
10it doesn't tell you anything about how compatible that version is.
11
12Author: Colin Watson <cjwatson@debian.org>
13Bug-Debian: https://bugs.debian.org/93581
14Bug-Debian: https://bugs.debian.org/664383
15Bug-Debian: https://bugs.debian.org/732940
16Forwarded: not-needed
17Last-Update: 2014-10-07
18
19Patch-Name: no-openssl-version-status.patch
20---
21 openbsd-compat/openssl-compat.c | 6 +++---
22 openbsd-compat/regress/opensslvertest.c | 1 +
23 2 files changed, 4 insertions(+), 3 deletions(-)
24
25diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
26index 259fccbe..aaa953f2 100644
27--- a/openbsd-compat/openssl-compat.c
28+++ b/openbsd-compat/openssl-compat.c
29@@ -34,7 +34,7 @@
30 /*
31 * OpenSSL version numbers: MNNFFPPS: major minor fix patch status
32 * We match major, minor, fix and status (not patch) for <1.0.0.
33- * After that, we acceptable compatible fix versions (so we
34+ * After that, we accept compatible fix and status versions (so we
35 * allow 1.0.1 to work with 1.0.0). Going backwards is only allowed
36 * within a patch series.
37 */
38@@ -55,10 +55,10 @@ ssh_compatible_openssl(long headerver, long libver)
39 }
40
41 /*
42- * For versions >= 1.0.0, major,minor,status must match and library
43+ * For versions >= 1.0.0, major,minor must match and library
44 * fix version must be equal to or newer than the header.
45 */
46- mask = 0xfff0000fL; /* major,minor,status */
47+ mask = 0xfff00000L; /* major,minor */
48 hfix = (headerver & 0x000ff000) >> 12;
49 lfix = (libver & 0x000ff000) >> 12;
50 if ( (headerver & mask) == (libver & mask) && lfix >= hfix)
51diff --git a/openbsd-compat/regress/opensslvertest.c b/openbsd-compat/regress/opensslvertest.c
52index 5d019b59..58474873 100644
53--- a/openbsd-compat/regress/opensslvertest.c
54+++ b/openbsd-compat/regress/opensslvertest.c
55@@ -35,6 +35,7 @@ struct version_test {
56
57 /* built with 1.0.1b release headers */
58 { 0x1000101fL, 0x1000101fL, 1},/* exact match */
59+ { 0x1000101fL, 0x10001010L, 1}, /* different status: ok */
60 { 0x1000101fL, 0x1000102fL, 1}, /* newer library patch version: ok */
61 { 0x1000101fL, 0x1000100fL, 1}, /* older library patch version: ok */
62 { 0x1000101fL, 0x1000201fL, 1}, /* newer library fix version: ok */
diff --git a/debian/patches/openbsd-docs.patch b/debian/patches/openbsd-docs.patch
new file mode 100644
index 000000000..a9e8aac29
--- /dev/null
+++ b/debian/patches/openbsd-docs.patch
@@ -0,0 +1,148 @@
1From c3d9231e598560dfe63a56a422439d263a2c3ebe Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:09 +0000
4Subject: Adjust various OpenBSD-specific references in manual pages
5
6No single bug reference for this patch, but history includes:
7 http://bugs.debian.org/154434 (login.conf(5))
8 http://bugs.debian.org/513417 (/etc/rc)
9 http://bugs.debian.org/530692 (ssl(8))
10 https://bugs.launchpad.net/bugs/456660 (ssl(8))
11
12Forwarded: not-needed
13Last-Update: 2017-10-04
14
15Patch-Name: openbsd-docs.patch
16---
17 moduli.5 | 4 ++--
18 ssh-keygen.1 | 12 ++++--------
19 ssh.1 | 4 ++++
20 sshd.8 | 5 ++---
21 sshd_config.5 | 3 +--
22 5 files changed, 13 insertions(+), 15 deletions(-)
23
24diff --git a/moduli.5 b/moduli.5
25index ef0de085..149846c8 100644
26--- a/moduli.5
27+++ b/moduli.5
28@@ -21,7 +21,7 @@
29 .Nd Diffie-Hellman moduli
30 .Sh DESCRIPTION
31 The
32-.Pa /etc/moduli
33+.Pa /etc/ssh/moduli
34 file contains prime numbers and generators for use by
35 .Xr sshd 8
36 in the Diffie-Hellman Group Exchange key exchange method.
37@@ -110,7 +110,7 @@ first estimates the size of the modulus required to produce enough
38 Diffie-Hellman output to sufficiently key the selected symmetric cipher.
39 .Xr sshd 8
40 then randomly selects a modulus from
41-.Fa /etc/moduli
42+.Fa /etc/ssh/moduli
43 that best meets the size requirement.
44 .Sh SEE ALSO
45 .Xr ssh-keygen 1 ,
46diff --git a/ssh-keygen.1 b/ssh-keygen.1
47index 3525d7d1..39767e62 100644
48--- a/ssh-keygen.1
49+++ b/ssh-keygen.1
50@@ -176,9 +176,7 @@ key in
51 .Pa ~/.ssh/id_ed25519
52 or
53 .Pa ~/.ssh/id_rsa .
54-Additionally, the system administrator may use this to generate host keys,
55-as seen in
56-.Pa /etc/rc .
57+Additionally, the system administrator may use this to generate host keys.
58 .Pp
59 Normally this program generates the key and asks for a file in which
60 to store the private key.
61@@ -229,9 +227,7 @@ If
62 .Fl f
63 has also been specified, its argument is used as a prefix to the
64 default path for the resulting host key files.
65-This is used by
66-.Pa /etc/rc
67-to generate new host keys.
68+This is used by system administration scripts to generate new host keys.
69 .It Fl a Ar rounds
70 When saving a new-format private key (i.e. an ed25519 key or when the
71 .Fl o
72@@ -685,7 +681,7 @@ option.
73 Valid generator values are 2, 3, and 5.
74 .Pp
75 Screened DH groups may be installed in
76-.Pa /etc/moduli .
77+.Pa /etc/ssh/moduli .
78 It is important that this file contains moduli of a range of bit lengths and
79 that both ends of a connection share common moduli.
80 .Sh CERTIFICATES
81@@ -872,7 +868,7 @@ on all machines
82 where the user wishes to log in using public key authentication.
83 There is no need to keep the contents of this file secret.
84 .Pp
85-.It Pa /etc/moduli
86+.It Pa /etc/ssh/moduli
87 Contains Diffie-Hellman groups used for DH-GEX.
88 The file format is described in
89 .Xr moduli 5 .
90diff --git a/ssh.1 b/ssh.1
91index 0ef7c170..54e21d88 100644
92--- a/ssh.1
93+++ b/ssh.1
94@@ -846,6 +846,10 @@ implements public key authentication protocol automatically,
95 using one of the DSA, ECDSA, Ed25519 or RSA algorithms.
96 The HISTORY section of
97 .Xr ssl 8
98+(on non-OpenBSD systems, see
99+.nh
100+http://www.openbsd.org/cgi\-bin/man.cgi?query=ssl&sektion=8#HISTORY)
101+.hy
102 contains a brief discussion of the DSA and RSA algorithms.
103 .Pp
104 The file
105diff --git a/sshd.8 b/sshd.8
106index c8299d5e..378aeb9f 100644
107--- a/sshd.8
108+++ b/sshd.8
109@@ -65,7 +65,7 @@ over an insecure network.
110 .Nm
111 listens for connections from clients.
112 It is normally started at boot from
113-.Pa /etc/rc .
114+.Pa /etc/init.d/ssh .
115 It forks a new
116 daemon for each incoming connection.
117 The forked daemons handle
118@@ -856,7 +856,7 @@ This file is for host-based authentication (see
119 .Xr ssh 1 ) .
120 It should only be writable by root.
121 .Pp
122-.It Pa /etc/moduli
123+.It Pa /etc/ssh/moduli
124 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange"
125 key exchange method.
126 The file format is described in
127@@ -954,7 +954,6 @@ The content of this file is not sensitive; it can be world-readable.
128 .Xr ssh-keyscan 1 ,
129 .Xr chroot 2 ,
130 .Xr hosts_access 5 ,
131-.Xr login.conf 5 ,
132 .Xr moduli 5 ,
133 .Xr sshd_config 5 ,
134 .Xr inetd 8 ,
135diff --git a/sshd_config.5 b/sshd_config.5
136index 45044a70..44b91846 100644
137--- a/sshd_config.5
138+++ b/sshd_config.5
139@@ -383,8 +383,7 @@ then no banner is displayed.
140 By default, no banner is displayed.
141 .It Cm ChallengeResponseAuthentication
142 Specifies whether challenge-response authentication is allowed (e.g. via
143-PAM or through authentication styles supported in
144-.Xr login.conf 5 )
145+PAM).
146 The default is
147 .Cm yes .
148 .It Cm ChrootDirectory
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch
new file mode 100644
index 000000000..db144f505
--- /dev/null
+++ b/debian/patches/package-versioning.patch
@@ -0,0 +1,61 @@
1From 52359fc0d6ee73ee6e24332b2777dc8abdaed652 Mon Sep 17 00:00:00 2001
2From: Matthew Vernon <matthew@debian.org>
3Date: Sun, 9 Feb 2014 16:10:05 +0000
4Subject: Include the Debian version in our identification
5
6This makes it easier to audit networks for versions patched against security
7vulnerabilities. It has little detrimental effect, as attackers will
8generally just try attacks rather than bothering to scan for
9vulnerable-looking version strings. (However, see debian-banner.patch.)
10
11Forwarded: not-needed
12Last-Update: 2017-10-04
13
14Patch-Name: package-versioning.patch
15---
16 sshconnect.c | 2 +-
17 sshd.c | 2 +-
18 version.h | 7 ++++++-
19 3 files changed, 8 insertions(+), 3 deletions(-)
20
21diff --git a/sshconnect.c b/sshconnect.c
22index 58f9eac8..15d8b807 100644
23--- a/sshconnect.c
24+++ b/sshconnect.c
25@@ -638,7 +638,7 @@ send_client_banner(int connection_out, int minor1)
26 {
27 /* Send our own protocol version identification. */
28 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n",
29- PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION);
30+ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE);
31 if (atomicio(vwrite, connection_out, client_version_string,
32 strlen(client_version_string)) != strlen(client_version_string))
33 fatal("write: %.100s", strerror(errno));
34diff --git a/sshd.c b/sshd.c
35index 6d911c19..9a7f5495 100644
36--- a/sshd.c
37+++ b/sshd.c
38@@ -384,7 +384,7 @@ sshd_exchange_identification(struct ssh *ssh, int sock_in, int sock_out)
39 char remote_version[256]; /* Must be at least as big as buf. */
40
41 xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s\r\n",
42- PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
43+ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE,
44 *options.version_addendum == '\0' ? "" : " ",
45 options.version_addendum);
46
47diff --git a/version.h b/version.h
48index ea52b26f..a3fa6e0b 100644
49--- a/version.h
50+++ b/version.h
51@@ -3,4 +3,9 @@
52 #define SSH_VERSION "OpenSSH_7.7"
53
54 #define SSH_PORTABLE "p1"
55-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
56+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
57+#ifdef SSH_EXTRAVERSION
58+#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION
59+#else
60+#define SSH_RELEASE SSH_RELEASE_MINIMUM
61+#endif
diff --git a/debian/patches/restore-authorized_keys2.patch b/debian/patches/restore-authorized_keys2.patch
new file mode 100644
index 000000000..2e680f5ce
--- /dev/null
+++ b/debian/patches/restore-authorized_keys2.patch
@@ -0,0 +1,35 @@
1From 1e4b9d8e6cee1e15edfc12aa0294fa78639496b9 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 5 Mar 2017 02:02:11 +0000
4Subject: Restore reading authorized_keys2 by default
5
6Upstream seems to intend to gradually phase this out, so don't assume
7that this will remain the default forever. However, we were late in
8adopting the upstream sshd_config changes, so it makes sense to extend
9the grace period.
10
11Bug-Debian: https://bugs.debian.org/852320
12Forwarded: not-needed
13Last-Update: 2017-03-05
14
15Patch-Name: restore-authorized_keys2.patch
16---
17 sshd_config | 5 ++---
18 1 file changed, 2 insertions(+), 3 deletions(-)
19
20diff --git a/sshd_config b/sshd_config
21index de9cc9fe..31e14a4f 100644
22--- a/sshd_config
23+++ b/sshd_config
24@@ -36,9 +36,8 @@
25
26 #PubkeyAuthentication yes
27
28-# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
29-# but this is overridden so installations will only check .ssh/authorized_keys
30-AuthorizedKeysFile .ssh/authorized_keys
31+# Expect .ssh/authorized_keys2 to be disregarded by default in future.
32+#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
33
34 #AuthorizedPrincipalsFile none
35
diff --git a/debian/patches/restore-tcp-wrappers.patch b/debian/patches/restore-tcp-wrappers.patch
new file mode 100644
index 000000000..4132937da
--- /dev/null
+++ b/debian/patches/restore-tcp-wrappers.patch
@@ -0,0 +1,172 @@
1From 398af3d66bfe8dc7d436570026571e522a0a13a0 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Tue, 7 Oct 2014 13:22:41 +0100
4Subject: Restore TCP wrappers support
5
6Support for TCP wrappers was dropped in OpenSSH 6.7. See this message
7and thread:
8
9 https://lists.mindrot.org/pipermail/openssh-unix-dev/2014-April/032497.html
10
11It is true that this reduces preauth attack surface in sshd. On the
12other hand, this support seems to be quite widely used, and abruptly
13dropping it (from the perspective of users who don't read
14openssh-unix-dev) could easily cause more serious problems in practice.
15
16It's not entirely clear what the right long-term answer for Debian is,
17but it at least probably doesn't involve dropping this feature shortly
18before a freeze.
19
20Forwarded: not-needed
21Last-Update: 2014-10-07
22
23Patch-Name: restore-tcp-wrappers.patch
24---
25 configure.ac | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26 sshd.8 | 7 +++++++
27 sshd.c | 25 +++++++++++++++++++++++++
28 3 files changed, 89 insertions(+)
29
30diff --git a/configure.ac b/configure.ac
31index 1cd5eab6..3e23e60d 100644
32--- a/configure.ac
33+++ b/configure.ac
34@@ -1566,6 +1566,62 @@ AC_ARG_WITH([skey],
35 ]
36 )
37
38+# Check whether user wants TCP wrappers support
39+TCPW_MSG="no"
40+AC_ARG_WITH([tcp-wrappers],
41+ [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)],
42+ [
43+ if test "x$withval" != "xno" ; then
44+ saved_LIBS="$LIBS"
45+ saved_LDFLAGS="$LDFLAGS"
46+ saved_CPPFLAGS="$CPPFLAGS"
47+ if test -n "${withval}" && \
48+ test "x${withval}" != "xyes"; then
49+ if test -d "${withval}/lib"; then
50+ if test -n "${need_dash_r}"; then
51+ LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
52+ else
53+ LDFLAGS="-L${withval}/lib ${LDFLAGS}"
54+ fi
55+ else
56+ if test -n "${need_dash_r}"; then
57+ LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
58+ else
59+ LDFLAGS="-L${withval} ${LDFLAGS}"
60+ fi
61+ fi
62+ if test -d "${withval}/include"; then
63+ CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
64+ else
65+ CPPFLAGS="-I${withval} ${CPPFLAGS}"
66+ fi
67+ fi
68+ LIBS="-lwrap $LIBS"
69+ AC_MSG_CHECKING([for libwrap])
70+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
71+#include <sys/types.h>
72+#include <sys/socket.h>
73+#include <netinet/in.h>
74+#include <tcpd.h>
75+int deny_severity = 0, allow_severity = 0;
76+ ]], [[
77+ hosts_access(0);
78+ ]])], [
79+ AC_MSG_RESULT([yes])
80+ AC_DEFINE([LIBWRAP], [1],
81+ [Define if you want
82+ TCP Wrappers support])
83+ SSHDLIBS="$SSHDLIBS -lwrap"
84+ TCPW_MSG="yes"
85+ ], [
86+ AC_MSG_ERROR([*** libwrap missing])
87+
88+ ])
89+ LIBS="$saved_LIBS"
90+ fi
91+ ]
92+)
93+
94 # Check whether user wants to use ldns
95 LDNS_MSG="no"
96 AC_ARG_WITH(ldns,
97@@ -5240,6 +5296,7 @@ echo " OSF SIA support: $SIA_MSG"
98 echo " KerberosV support: $KRB5_MSG"
99 echo " SELinux support: $SELINUX_MSG"
100 echo " S/KEY support: $SKEY_MSG"
101+echo " TCP Wrappers support: $TCPW_MSG"
102 echo " MD5 password support: $MD5_MSG"
103 echo " libedit support: $LIBEDIT_MSG"
104 echo " libldns support: $LDNS_MSG"
105diff --git a/sshd.8 b/sshd.8
106index 968ba66b..c8299d5e 100644
107--- a/sshd.8
108+++ b/sshd.8
109@@ -845,6 +845,12 @@ the user's home directory becomes accessible.
110 This file should be writable only by the user, and need not be
111 readable by anyone else.
112 .Pp
113+.It Pa /etc/hosts.allow
114+.It Pa /etc/hosts.deny
115+Access controls that should be enforced by tcp-wrappers are defined here.
116+Further details are described in
117+.Xr hosts_access 5 .
118+.Pp
119 .It Pa /etc/hosts.equiv
120 This file is for host-based authentication (see
121 .Xr ssh 1 ) .
122@@ -947,6 +953,7 @@ The content of this file is not sensitive; it can be world-readable.
123 .Xr ssh-keygen 1 ,
124 .Xr ssh-keyscan 1 ,
125 .Xr chroot 2 ,
126+.Xr hosts_access 5 ,
127 .Xr login.conf 5 ,
128 .Xr moduli 5 ,
129 .Xr sshd_config 5 ,
130diff --git a/sshd.c b/sshd.c
131index e88185ef..4ed0364f 100644
132--- a/sshd.c
133+++ b/sshd.c
134@@ -127,6 +127,13 @@
135 #include <Security/AuthSession.h>
136 #endif
137
138+#ifdef LIBWRAP
139+#include <tcpd.h>
140+#include <syslog.h>
141+int allow_severity;
142+int deny_severity;
143+#endif /* LIBWRAP */
144+
145 /* Re-exec fds */
146 #define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1)
147 #define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2)
148@@ -2042,6 +2049,24 @@ main(int ac, char **av)
149 #ifdef SSH_AUDIT_EVENTS
150 audit_connection_from(remote_ip, remote_port);
151 #endif
152+#ifdef LIBWRAP
153+ allow_severity = options.log_facility|LOG_INFO;
154+ deny_severity = options.log_facility|LOG_WARNING;
155+ /* Check whether logins are denied from this host. */
156+ if (packet_connection_is_on_socket()) {
157+ struct request_info req;
158+
159+ request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0);
160+ fromhost(&req);
161+
162+ if (!hosts_access(&req)) {
163+ debug("Connection refused by tcp wrapper");
164+ refuse(&req);
165+ /* NOTREACHED */
166+ fatal("libwrap refuse returns");
167+ }
168+ }
169+#endif /* LIBWRAP */
170
171 rdomain = ssh_packet_rdomain_in(ssh);
172
diff --git a/debian/patches/scp-quoting.patch b/debian/patches/scp-quoting.patch
new file mode 100644
index 000000000..d969d5e8e
--- /dev/null
+++ b/debian/patches/scp-quoting.patch
@@ -0,0 +1,41 @@
1From e800454207f4d7a0c402f129029b8282209cdf74 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Nicolas=20Valc=C3=A1rcel?= <nvalcarcel@ubuntu.com>
3Date: Sun, 9 Feb 2014 16:09:59 +0000
4Subject: Adjust scp quoting in verbose mode
5
6Tweak scp's reporting of filenames in verbose mode to be a bit less
7confusing with spaces.
8
9This should be revised to mimic real shell quoting.
10
11Bug-Ubuntu: https://bugs.launchpad.net/bugs/89945
12Last-Update: 2010-02-27
13
14Patch-Name: scp-quoting.patch
15---
16 scp.c | 12 ++++++++++--
17 1 file changed, 10 insertions(+), 2 deletions(-)
18
19diff --git a/scp.c b/scp.c
20index 31e6709f..2bbf6938 100644
21--- a/scp.c
22+++ b/scp.c
23@@ -198,8 +198,16 @@ do_local_cmd(arglist *a)
24
25 if (verbose_mode) {
26 fprintf(stderr, "Executing:");
27- for (i = 0; i < a->num; i++)
28- fmprintf(stderr, " %s", a->list[i]);
29+ for (i = 0; i < a->num; i++) {
30+ if (i == 0)
31+ fmprintf(stderr, " %s", a->list[i]);
32+ else
33+ /*
34+ * TODO: misbehaves if a->list[i] contains a
35+ * single quote
36+ */
37+ fmprintf(stderr, " '%s'", a->list[i]);
38+ }
39 fprintf(stderr, "\n");
40 }
41 if ((pid = fork()) == -1)
diff --git a/debian/patches/seccomp-getuid-geteuid.patch b/debian/patches/seccomp-getuid-geteuid.patch
new file mode 100644
index 000000000..293322e9c
--- /dev/null
+++ b/debian/patches/seccomp-getuid-geteuid.patch
@@ -0,0 +1,44 @@
1From 5b35741e661c6a95e39f5f897ae62c0f3686ca4f Mon Sep 17 00:00:00 2001
2From: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
3Date: Tue, 9 May 2017 13:31:05 -0300
4Subject: Allow getuid and geteuid calls
5
6getuid and geteuid are needed when using an openssl engine that calls a
7crypto card, e.g. ICA (libica).
8Those syscalls are also needed by the distros for audit code.
9
10Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
11
12Origin: other, https://bugzilla.mindrot.org/show_bug.cgi?id=2752
13Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2752
14Bug-Ubuntu: https://bugs.launchpad.net/bugs/1686618
15Last-Update: 2017-08-28
16
17Patch-Name: seccomp-getuid-geteuid.patch
18---
19 sandbox-seccomp-filter.c | 12 ++++++++++++
20 1 file changed, 12 insertions(+)
21
22diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
23index 6e7de311..e86aa2c9 100644
24--- a/sandbox-seccomp-filter.c
25+++ b/sandbox-seccomp-filter.c
26@@ -175,6 +175,18 @@ static const struct sock_filter preauth_insns[] = {
27 #ifdef __NR_getpid
28 SC_ALLOW(__NR_getpid),
29 #endif
30+#ifdef __NR_getuid
31+ SC_ALLOW(__NR_getuid),
32+#endif
33+#ifdef __NR_getuid32
34+ SC_ALLOW(__NR_getuid32),
35+#endif
36+#ifdef __NR_geteuid
37+ SC_ALLOW(__NR_geteuid),
38+#endif
39+#ifdef __NR_geteuid32
40+ SC_ALLOW(__NR_geteuid32),
41+#endif
42 #ifdef __NR_getrandom
43 SC_ALLOW(__NR_getrandom),
44 #endif
diff --git a/debian/patches/seccomp-s390-flock-ipc.patch b/debian/patches/seccomp-s390-flock-ipc.patch
new file mode 100644
index 000000000..030d8f417
--- /dev/null
+++ b/debian/patches/seccomp-s390-flock-ipc.patch
@@ -0,0 +1,47 @@
1From 8435aa5e322a4899dcb9bc68d5f0551e93d3f5a5 Mon Sep 17 00:00:00 2001
2From: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
3Date: Tue, 9 May 2017 10:53:04 -0300
4Subject: Allow flock and ipc syscall for s390 architecture
5
6In order to use the OpenSSL-ibmpkcs11 engine it is needed to allow flock
7and ipc calls, because this engine calls OpenCryptoki (a PKCS#11
8implementation) which calls the libraries that will communicate with the
9crypto cards. OpenCryptoki makes use of flock and ipc and, as of now,
10this is only need on s390 architecture.
11
12Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
13
14Origin: other, https://bugzilla.mindrot.org/show_bug.cgi?id=2752
15Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2752
16Bug-Ubuntu: https://bugs.launchpad.net/bugs/1686618
17Last-Update: 2017-08-28
18
19Patch-Name: seccomp-s390-flock-ipc.patch
20---
21 sandbox-seccomp-filter.c | 6 ++++++
22 1 file changed, 6 insertions(+)
23
24diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
25index ca75cc71..6e7de311 100644
26--- a/sandbox-seccomp-filter.c
27+++ b/sandbox-seccomp-filter.c
28@@ -166,6 +166,9 @@ static const struct sock_filter preauth_insns[] = {
29 #ifdef __NR_exit_group
30 SC_ALLOW(__NR_exit_group),
31 #endif
32+#if defined(__NR_flock) && defined(__s390__)
33+ SC_ALLOW(__NR_flock),
34+#endif
35 #ifdef __NR_getpgid
36 SC_ALLOW(__NR_getpgid),
37 #endif
38@@ -178,6 +181,9 @@ static const struct sock_filter preauth_insns[] = {
39 #ifdef __NR_gettimeofday
40 SC_ALLOW(__NR_gettimeofday),
41 #endif
42+#if defined(__NR_ipc) && defined(__s390__)
43+ SC_ALLOW(__NR_ipc),
44+#endif
45 #ifdef __NR_madvise
46 SC_ALLOW(__NR_madvise),
47 #endif
diff --git a/debian/patches/seccomp-s390-ioctl-ep11-crypto.patch b/debian/patches/seccomp-s390-ioctl-ep11-crypto.patch
new file mode 100644
index 000000000..77606886d
--- /dev/null
+++ b/debian/patches/seccomp-s390-ioctl-ep11-crypto.patch
@@ -0,0 +1,33 @@
1From ea67bc97339c9a507343e4a1f5fb867f678fbe1d Mon Sep 17 00:00:00 2001
2From: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
3Date: Tue, 9 May 2017 13:33:30 -0300
4Subject: Enable specific ioctl call for EP11 crypto card (s390)
5
6The EP11 crypto card needs to make an ioctl call, which receives an
7specific argument. This crypto card is for s390 only.
8
9Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
10
11Origin: other, https://bugzilla.mindrot.org/show_bug.cgi?id=2752
12Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=2752
13Bug-Ubuntu: https://bugs.launchpad.net/bugs/1686618
14Last-Update: 2017-08-28
15
16Patch-Name: seccomp-s390-ioctl-ep11-crypto.patch
17---
18 sandbox-seccomp-filter.c | 2 ++
19 1 file changed, 2 insertions(+)
20
21diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c
22index e86aa2c9..98062f15 100644
23--- a/sandbox-seccomp-filter.c
24+++ b/sandbox-seccomp-filter.c
25@@ -250,6 +250,8 @@ static const struct sock_filter preauth_insns[] = {
26 SC_ALLOW_ARG(__NR_ioctl, 1, Z90STAT_STATUS_MASK),
27 SC_ALLOW_ARG(__NR_ioctl, 1, ICARSAMODEXPO),
28 SC_ALLOW_ARG(__NR_ioctl, 1, ICARSACRT),
29+ /* Allow ioctls for EP11 crypto card on s390 */
30+ SC_ALLOW_ARG(__NR_ioctl, 1, ZSENDEP11CPRB),
31 #endif
32 #if defined(__x86_64__) && defined(__ILP32__) && defined(__X32_SYSCALL_BIT)
33 /*
diff --git a/debian/patches/selinux-role.patch b/debian/patches/selinux-role.patch
new file mode 100644
index 000000000..5662207cd
--- /dev/null
+++ b/debian/patches/selinux-role.patch
@@ -0,0 +1,473 @@
1From 7da968d97beba5fb80a5488516563ea1376db907 Mon Sep 17 00:00:00 2001
2From: Manoj Srivastava <srivasta@debian.org>
3Date: Sun, 9 Feb 2014 16:09:49 +0000
4Subject: Handle SELinux authorisation roles
5
6Rejected upstream due to discomfort with magic usernames; a better approach
7will need an SSH protocol change. In the meantime, this came from Debian's
8SELinux maintainer, so we'll keep it until we have something better.
9
10Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1641
11Bug-Debian: http://bugs.debian.org/394795
12Last-Update: 2017-10-04
13
14Patch-Name: selinux-role.patch
15---
16 auth.h | 1 +
17 auth2.c | 10 ++++++++--
18 monitor.c | 32 +++++++++++++++++++++++++++++---
19 monitor.h | 2 ++
20 monitor_wrap.c | 22 ++++++++++++++++++++--
21 monitor_wrap.h | 3 ++-
22 openbsd-compat/port-linux.c | 27 ++++++++++++++++++++-------
23 openbsd-compat/port-linux.h | 4 ++--
24 platform.c | 4 ++--
25 platform.h | 2 +-
26 session.c | 10 +++++-----
27 session.h | 2 +-
28 sshd.c | 2 +-
29 sshpty.c | 4 ++--
30 sshpty.h | 2 +-
31 15 files changed, 97 insertions(+), 30 deletions(-)
32
33diff --git a/auth.h b/auth.h
34index 23ce67ca..15ba7073 100644
35--- a/auth.h
36+++ b/auth.h
37@@ -65,6 +65,7 @@ struct Authctxt {
38 char *service;
39 struct passwd *pw; /* set if 'valid' */
40 char *style;
41+ char *role;
42
43 /* Method lists for multiple authentication */
44 char **auth_methods; /* modified from server config */
45diff --git a/auth2.c b/auth2.c
46index c34f58c4..be5e9f15 100644
47--- a/auth2.c
48+++ b/auth2.c
49@@ -218,7 +218,7 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
50 {
51 Authctxt *authctxt = ssh->authctxt;
52 Authmethod *m = NULL;
53- char *user, *service, *method, *style = NULL;
54+ char *user, *service, *method, *style = NULL, *role = NULL;
55 int authenticated = 0;
56
57 if (authctxt == NULL)
58@@ -230,8 +230,13 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
59 debug("userauth-request for user %s service %s method %s", user, service, method);
60 debug("attempt %d failures %d", authctxt->attempt, authctxt->failures);
61
62+ if ((role = strchr(user, '/')) != NULL)
63+ *role++ = 0;
64+
65 if ((style = strchr(user, ':')) != NULL)
66 *style++ = 0;
67+ else if (role && (style = strchr(role, ':')) != NULL)
68+ *style++ = '\0';
69
70 if (authctxt->attempt++ == 0) {
71 /* setup auth context */
72@@ -258,8 +263,9 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
73 use_privsep ? " [net]" : "");
74 authctxt->service = xstrdup(service);
75 authctxt->style = style ? xstrdup(style) : NULL;
76+ authctxt->role = role ? xstrdup(role) : NULL;
77 if (use_privsep)
78- mm_inform_authserv(service, style);
79+ mm_inform_authserv(service, style, role);
80 userauth_banner();
81 if (auth2_setup_methods_lists(authctxt) != 0)
82 packet_disconnect("no authentication methods enabled");
83diff --git a/monitor.c b/monitor.c
84index 868fb0d2..ed37458f 100644
85--- a/monitor.c
86+++ b/monitor.c
87@@ -128,6 +128,7 @@ int mm_answer_sign(int, Buffer *);
88 int mm_answer_pwnamallow(int, Buffer *);
89 int mm_answer_auth2_read_banner(int, Buffer *);
90 int mm_answer_authserv(int, Buffer *);
91+int mm_answer_authrole(int, Buffer *);
92 int mm_answer_authpassword(int, Buffer *);
93 int mm_answer_bsdauthquery(int, Buffer *);
94 int mm_answer_bsdauthrespond(int, Buffer *);
95@@ -206,6 +207,7 @@ struct mon_table mon_dispatch_proto20[] = {
96 {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign},
97 {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow},
98 {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv},
99+ {MONITOR_REQ_AUTHROLE, MON_ONCE, mm_answer_authrole},
100 {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner},
101 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
102 #ifdef USE_PAM
103@@ -806,6 +808,7 @@ mm_answer_pwnamallow(int sock, Buffer *m)
104
105 /* Allow service/style information on the auth context */
106 monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1);
107+ monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1);
108 monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
109
110 #ifdef USE_PAM
111@@ -836,14 +839,37 @@ mm_answer_authserv(int sock, Buffer *m)
112
113 authctxt->service = buffer_get_string(m, NULL);
114 authctxt->style = buffer_get_string(m, NULL);
115- debug3("%s: service=%s, style=%s",
116- __func__, authctxt->service, authctxt->style);
117+ authctxt->role = buffer_get_string(m, NULL);
118+ debug3("%s: service=%s, style=%s, role=%s",
119+ __func__, authctxt->service, authctxt->style, authctxt->role);
120
121 if (strlen(authctxt->style) == 0) {
122 free(authctxt->style);
123 authctxt->style = NULL;
124 }
125
126+ if (strlen(authctxt->role) == 0) {
127+ free(authctxt->role);
128+ authctxt->role = NULL;
129+ }
130+
131+ return (0);
132+}
133+
134+int
135+mm_answer_authrole(int sock, Buffer *m)
136+{
137+ monitor_permit_authentications(1);
138+
139+ authctxt->role = buffer_get_string(m, NULL);
140+ debug3("%s: role=%s",
141+ __func__, authctxt->role);
142+
143+ if (strlen(authctxt->role) == 0) {
144+ free(authctxt->role);
145+ authctxt->role = NULL;
146+ }
147+
148 return (0);
149 }
150
151@@ -1497,7 +1523,7 @@ mm_answer_pty(int sock, Buffer *m)
152 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
153 if (res == 0)
154 goto error;
155- pty_setowner(authctxt->pw, s->tty);
156+ pty_setowner(authctxt->pw, s->tty, authctxt->role);
157
158 buffer_put_int(m, 1);
159 buffer_put_cstring(m, s->tty);
160diff --git a/monitor.h b/monitor.h
161index ec41404c..4c7955d7 100644
162--- a/monitor.h
163+++ b/monitor.h
164@@ -68,6 +68,8 @@ enum monitor_reqtype {
165 MONITOR_REQ_GSSSIGN = 150, MONITOR_ANS_GSSSIGN = 151,
166 MONITOR_REQ_GSSUPCREDS = 152, MONITOR_ANS_GSSUPCREDS = 153,
167
168+ MONITOR_REQ_AUTHROLE = 154,
169+
170 };
171
172 struct monitor {
173diff --git a/monitor_wrap.c b/monitor_wrap.c
174index e749efc1..7b2d06c6 100644
175--- a/monitor_wrap.c
176+++ b/monitor_wrap.c
177@@ -331,10 +331,10 @@ mm_auth2_read_banner(void)
178 return (banner);
179 }
180
181-/* Inform the privileged process about service and style */
182+/* Inform the privileged process about service, style, and role */
183
184 void
185-mm_inform_authserv(char *service, char *style)
186+mm_inform_authserv(char *service, char *style, char *role)
187 {
188 Buffer m;
189
190@@ -343,12 +343,30 @@ mm_inform_authserv(char *service, char *style)
191 buffer_init(&m);
192 buffer_put_cstring(&m, service);
193 buffer_put_cstring(&m, style ? style : "");
194+ buffer_put_cstring(&m, role ? role : "");
195
196 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m);
197
198 buffer_free(&m);
199 }
200
201+/* Inform the privileged process about role */
202+
203+void
204+mm_inform_authrole(char *role)
205+{
206+ Buffer m;
207+
208+ debug3("%s entering", __func__);
209+
210+ buffer_init(&m);
211+ buffer_put_cstring(&m, role ? role : "");
212+
213+ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m);
214+
215+ buffer_free(&m);
216+}
217+
218 /* Do the password authentication */
219 int
220 mm_auth_password(struct ssh *ssh, char *password)
221diff --git a/monitor_wrap.h b/monitor_wrap.h
222index 0970d1f8..492de5c8 100644
223--- a/monitor_wrap.h
224+++ b/monitor_wrap.h
225@@ -43,7 +43,8 @@ int mm_is_monitor(void);
226 DH *mm_choose_dh(int, int, int);
227 int mm_key_sign(struct sshkey *, u_char **, u_int *, const u_char *, u_int,
228 const char *);
229-void mm_inform_authserv(char *, char *);
230+void mm_inform_authserv(char *, char *, char *);
231+void mm_inform_authrole(char *);
232 struct passwd *mm_getpwnamallow(const char *);
233 char *mm_auth2_read_banner(void);
234 int mm_auth_password(struct ssh *, char *);
235diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
236index 8c5325cc..8a3e5c68 100644
237--- a/openbsd-compat/port-linux.c
238+++ b/openbsd-compat/port-linux.c
239@@ -27,6 +27,12 @@
240 #include <string.h>
241 #include <stdio.h>
242
243+#ifdef WITH_SELINUX
244+#include "key.h"
245+#include "hostfile.h"
246+#include "auth.h"
247+#endif
248+
249 #include "log.h"
250 #include "xmalloc.h"
251 #include "port-linux.h"
252@@ -55,7 +61,7 @@ ssh_selinux_enabled(void)
253
254 /* Return the default security context for the given username */
255 static security_context_t
256-ssh_selinux_getctxbyname(char *pwname)
257+ssh_selinux_getctxbyname(char *pwname, const char *role)
258 {
259 security_context_t sc = NULL;
260 char *sename = NULL, *lvl = NULL;
261@@ -70,9 +76,16 @@ ssh_selinux_getctxbyname(char *pwname)
262 #endif
263
264 #ifdef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL
265- r = get_default_context_with_level(sename, lvl, NULL, &sc);
266+ if (role != NULL && role[0])
267+ r = get_default_context_with_rolelevel(sename, role, lvl, NULL,
268+ &sc);
269+ else
270+ r = get_default_context_with_level(sename, lvl, NULL, &sc);
271 #else
272- r = get_default_context(sename, NULL, &sc);
273+ if (role != NULL && role[0])
274+ r = get_default_context_with_role(sename, role, NULL, &sc);
275+ else
276+ r = get_default_context(sename, NULL, &sc);
277 #endif
278
279 if (r != 0) {
280@@ -102,7 +115,7 @@ ssh_selinux_getctxbyname(char *pwname)
281
282 /* Set the execution context to the default for the specified user */
283 void
284-ssh_selinux_setup_exec_context(char *pwname)
285+ssh_selinux_setup_exec_context(char *pwname, const char *role)
286 {
287 security_context_t user_ctx = NULL;
288
289@@ -111,7 +124,7 @@ ssh_selinux_setup_exec_context(char *pwname)
290
291 debug3("%s: setting execution context", __func__);
292
293- user_ctx = ssh_selinux_getctxbyname(pwname);
294+ user_ctx = ssh_selinux_getctxbyname(pwname, role);
295 if (setexeccon(user_ctx) != 0) {
296 switch (security_getenforce()) {
297 case -1:
298@@ -133,7 +146,7 @@ ssh_selinux_setup_exec_context(char *pwname)
299
300 /* Set the TTY context for the specified user */
301 void
302-ssh_selinux_setup_pty(char *pwname, const char *tty)
303+ssh_selinux_setup_pty(char *pwname, const char *tty, const char *role)
304 {
305 security_context_t new_tty_ctx = NULL;
306 security_context_t user_ctx = NULL;
307@@ -145,7 +158,7 @@ ssh_selinux_setup_pty(char *pwname, const char *tty)
308
309 debug3("%s: setting TTY context on %s", __func__, tty);
310
311- user_ctx = ssh_selinux_getctxbyname(pwname);
312+ user_ctx = ssh_selinux_getctxbyname(pwname, role);
313
314 /* XXX: should these calls fatal() upon failure in enforcing mode? */
315
316diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h
317index 3c22a854..c8812942 100644
318--- a/openbsd-compat/port-linux.h
319+++ b/openbsd-compat/port-linux.h
320@@ -19,8 +19,8 @@
321
322 #ifdef WITH_SELINUX
323 int ssh_selinux_enabled(void);
324-void ssh_selinux_setup_pty(char *, const char *);
325-void ssh_selinux_setup_exec_context(char *);
326+void ssh_selinux_setup_pty(char *, const char *, const char *);
327+void ssh_selinux_setup_exec_context(char *, const char *);
328 void ssh_selinux_change_context(const char *);
329 void ssh_selinux_setfscreatecon(const char *);
330 #endif
331diff --git a/platform.c b/platform.c
332index 18c7751d..380ee3a4 100644
333--- a/platform.c
334+++ b/platform.c
335@@ -143,7 +143,7 @@ platform_setusercontext(struct passwd *pw)
336 * called if sshd is running as root.
337 */
338 void
339-platform_setusercontext_post_groups(struct passwd *pw)
340+platform_setusercontext_post_groups(struct passwd *pw, const char *role)
341 {
342 #if !defined(HAVE_LOGIN_CAP) && defined(USE_PAM)
343 /*
344@@ -184,7 +184,7 @@ platform_setusercontext_post_groups(struct passwd *pw)
345 }
346 #endif /* HAVE_SETPCRED */
347 #ifdef WITH_SELINUX
348- ssh_selinux_setup_exec_context(pw->pw_name);
349+ ssh_selinux_setup_exec_context(pw->pw_name, role);
350 #endif
351 }
352
353diff --git a/platform.h b/platform.h
354index ea4f9c58..60d72ffe 100644
355--- a/platform.h
356+++ b/platform.h
357@@ -25,7 +25,7 @@ void platform_post_fork_parent(pid_t child_pid);
358 void platform_post_fork_child(void);
359 int platform_privileged_uidswap(void);
360 void platform_setusercontext(struct passwd *);
361-void platform_setusercontext_post_groups(struct passwd *);
362+void platform_setusercontext_post_groups(struct passwd *, const char *);
363 char *platform_get_krb5_client(const char *);
364 char *platform_krb5_get_principal_name(const char *);
365 int platform_sys_dir_uid(uid_t);
366diff --git a/session.c b/session.c
367index 58826db1..ff301c98 100644
368--- a/session.c
369+++ b/session.c
370@@ -1322,7 +1322,7 @@ safely_chroot(const char *path, uid_t uid)
371
372 /* Set login name, uid, gid, and groups. */
373 void
374-do_setusercontext(struct passwd *pw)
375+do_setusercontext(struct passwd *pw, const char *role)
376 {
377 char *chroot_path, *tmp;
378
379@@ -1350,7 +1350,7 @@ do_setusercontext(struct passwd *pw)
380 endgrent();
381 #endif
382
383- platform_setusercontext_post_groups(pw);
384+ platform_setusercontext_post_groups(pw, role);
385
386 if (!in_chroot && options.chroot_directory != NULL &&
387 strcasecmp(options.chroot_directory, "none") != 0) {
388@@ -1487,7 +1487,7 @@ do_child(struct ssh *ssh, Session *s, const char *command)
389
390 /* Force a password change */
391 if (s->authctxt->force_pwchange) {
392- do_setusercontext(pw);
393+ do_setusercontext(pw, s->authctxt->role);
394 child_close_fds(ssh);
395 do_pwchange(s);
396 exit(1);
397@@ -1505,7 +1505,7 @@ do_child(struct ssh *ssh, Session *s, const char *command)
398 /* When PAM is enabled we rely on it to do the nologin check */
399 if (!options.use_pam)
400 do_nologin(pw);
401- do_setusercontext(pw);
402+ do_setusercontext(pw, s->authctxt->role);
403 /*
404 * PAM session modules in do_setusercontext may have
405 * generated messages, so if this in an interactive
406@@ -1897,7 +1897,7 @@ session_pty_req(struct ssh *ssh, Session *s)
407 tty_parse_modes(s->ttyfd, &n_bytes);
408
409 if (!use_privsep)
410- pty_setowner(s->pw, s->tty);
411+ pty_setowner(s->pw, s->tty, s->authctxt->role);
412
413 /* Set window size from the packet. */
414 pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel);
415diff --git a/session.h b/session.h
416index 54dd1f0c..8535ebce 100644
417--- a/session.h
418+++ b/session.h
419@@ -76,7 +76,7 @@ void session_pty_cleanup2(Session *);
420 Session *session_new(void);
421 Session *session_by_tty(char *);
422 void session_close(struct ssh *, Session *);
423-void do_setusercontext(struct passwd *);
424+void do_setusercontext(struct passwd *, const char *);
425
426 const char *session_get_remote_name_or_ip(struct ssh *, u_int, int);
427
428diff --git a/sshd.c b/sshd.c
429index 4ed0364f..6d911c19 100644
430--- a/sshd.c
431+++ b/sshd.c
432@@ -679,7 +679,7 @@ privsep_postauth(Authctxt *authctxt)
433 reseed_prngs();
434
435 /* Drop privileges */
436- do_setusercontext(authctxt->pw);
437+ do_setusercontext(authctxt->pw, authctxt->role);
438
439 skip:
440 /* It is safe now to apply the key state */
441diff --git a/sshpty.c b/sshpty.c
442index 4da84d05..676ade50 100644
443--- a/sshpty.c
444+++ b/sshpty.c
445@@ -162,7 +162,7 @@ pty_change_window_size(int ptyfd, u_int row, u_int col,
446 }
447
448 void
449-pty_setowner(struct passwd *pw, const char *tty)
450+pty_setowner(struct passwd *pw, const char *tty, const char *role)
451 {
452 struct group *grp;
453 gid_t gid;
454@@ -184,7 +184,7 @@ pty_setowner(struct passwd *pw, const char *tty)
455 strerror(errno));
456
457 #ifdef WITH_SELINUX
458- ssh_selinux_setup_pty(pw->pw_name, tty);
459+ ssh_selinux_setup_pty(pw->pw_name, tty, role);
460 #endif
461
462 if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
463diff --git a/sshpty.h b/sshpty.h
464index 9ec7e9a1..de7e000a 100644
465--- a/sshpty.h
466+++ b/sshpty.h
467@@ -24,5 +24,5 @@ int pty_allocate(int *, int *, char *, size_t);
468 void pty_release(const char *);
469 void pty_make_controlling_tty(int *, const char *);
470 void pty_change_window_size(int, u_int, u_int, u_int, u_int);
471-void pty_setowner(struct passwd *, const char *);
472+void pty_setowner(struct passwd *, const char *, const char *);
473 void disconnect_controlling_tty(void);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 000000000..e409902b5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,26 @@
1gssapi.patch
2restore-tcp-wrappers.patch
3selinux-role.patch
4ssh-vulnkey-compat.patch
5keepalive-extensions.patch
6syslog-level-silent.patch
7user-group-modes.patch
8scp-quoting.patch
9shell-path.patch
10dnssec-sshfp.patch
11mention-ssh-keygen-on-keychange.patch
12package-versioning.patch
13debian-banner.patch
14authorized-keys-man-symlink.patch
15openbsd-docs.patch
16ssh-argv0.patch
17doc-hash-tab-completion.patch
18ssh-agent-setgid.patch
19no-openssl-version-status.patch
20gnome-ssh-askpass2-icon.patch
21systemd-readiness.patch
22debian-config.patch
23restore-authorized_keys2.patch
24seccomp-s390-flock-ipc.patch
25seccomp-getuid-geteuid.patch
26seccomp-s390-ioctl-ep11-crypto.patch
diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch
new file mode 100644
index 000000000..638d348f2
--- /dev/null
+++ b/debian/patches/shell-path.patch
@@ -0,0 +1,39 @@
1From 72fead7f622b074c9b92dbdb8ae745faf2702b3d Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:00 +0000
4Subject: Look for $SHELL on the path for ProxyCommand/LocalCommand
5
6There's some debate on the upstream bug about whether POSIX requires this.
7I (Colin Watson) agree with Vincent and think it does.
8
9Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494
10Bug-Debian: http://bugs.debian.org/492728
11Last-Update: 2013-09-14
12
13Patch-Name: shell-path.patch
14---
15 sshconnect.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/sshconnect.c b/sshconnect.c
19index 3805d35d..8ab01c0e 100644
20--- a/sshconnect.c
21+++ b/sshconnect.c
22@@ -239,7 +239,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port,
23 /* Execute the proxy command. Note that we gave up any
24 extra privileges above. */
25 signal(SIGPIPE, SIG_DFL);
26- execv(argv[0], argv);
27+ execvp(argv[0], argv);
28 perror(argv[0]);
29 exit(1);
30 }
31@@ -1554,7 +1554,7 @@ ssh_local_cmd(const char *args)
32 if (pid == 0) {
33 signal(SIGPIPE, SIG_DFL);
34 debug3("Executing %s -c \"%s\"", shell, args);
35- execl(shell, shell, "-c", args, (char *)NULL);
36+ execlp(shell, shell, "-c", args, (char *)NULL);
37 error("Couldn't execute %s -c \"%s\": %s",
38 shell, args, strerror(errno));
39 _exit(1);
diff --git a/debian/patches/ssh-agent-setgid.patch b/debian/patches/ssh-agent-setgid.patch
new file mode 100644
index 000000000..b7cd10dd1
--- /dev/null
+++ b/debian/patches/ssh-agent-setgid.patch
@@ -0,0 +1,40 @@
1From 9155e0368189860345a5f4b52a756266704447af Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:13 +0000
4Subject: Document consequences of ssh-agent being setgid in ssh-agent(1)
5
6Bug-Debian: http://bugs.debian.org/711623
7Forwarded: no
8Last-Update: 2013-06-08
9
10Patch-Name: ssh-agent-setgid.patch
11---
12 ssh-agent.1 | 15 +++++++++++++++
13 1 file changed, 15 insertions(+)
14
15diff --git a/ssh-agent.1 b/ssh-agent.1
16index 83b2b41c..7230704a 100644
17--- a/ssh-agent.1
18+++ b/ssh-agent.1
19@@ -206,6 +206,21 @@ environment variable holds the agent's process ID.
20 .Pp
21 The agent exits automatically when the command given on the command
22 line terminates.
23+.Pp
24+In Debian,
25+.Nm
26+is installed with the set-group-id bit set, to prevent
27+.Xr ptrace 2
28+attacks retrieving private key material.
29+This has the side-effect of causing the run-time linker to remove certain
30+environment variables which might have security implications for set-id
31+programs, including
32+.Ev LD_PRELOAD ,
33+.Ev LD_LIBRARY_PATH ,
34+and
35+.Ev TMPDIR .
36+If you need to set any of these environment variables, you will need to do
37+so in the program executed by ssh-agent.
38 .Sh FILES
39 .Bl -tag -width Ds
40 .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>
diff --git a/debian/patches/ssh-argv0.patch b/debian/patches/ssh-argv0.patch
new file mode 100644
index 000000000..2539fa8ed
--- /dev/null
+++ b/debian/patches/ssh-argv0.patch
@@ -0,0 +1,31 @@
1From 77113aa5aacb35d773268411edbe3bca4255703d Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:10:10 +0000
4Subject: ssh(1): Refer to ssh-argv0(1)
5
6Old versions of OpenSSH (up to 2.5 or thereabouts) allowed creating symlinks
7to ssh with the name of the host you want to connect to. Debian ships an
8ssh-argv0 script restoring this feature; this patch refers to its manual
9page from ssh(1).
10
11Bug-Debian: http://bugs.debian.org/111341
12Forwarded: not-needed
13Last-Update: 2013-09-14
14
15Patch-Name: ssh-argv0.patch
16---
17 ssh.1 | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/ssh.1 b/ssh.1
21index 54e21d88..f8fc26d2 100644
22--- a/ssh.1
23+++ b/ssh.1
24@@ -1571,6 +1571,7 @@ if an error occurred.
25 .Xr sftp 1 ,
26 .Xr ssh-add 1 ,
27 .Xr ssh-agent 1 ,
28+.Xr ssh-argv0 1 ,
29 .Xr ssh-keygen 1 ,
30 .Xr ssh-keyscan 1 ,
31 .Xr tun 4 ,
diff --git a/debian/patches/ssh-vulnkey-compat.patch b/debian/patches/ssh-vulnkey-compat.patch
new file mode 100644
index 000000000..34ff8a497
--- /dev/null
+++ b/debian/patches/ssh-vulnkey-compat.patch
@@ -0,0 +1,42 @@
1From 4fb99d4eb8936b6ffae3749717abfc2dccbaa162 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Sun, 9 Feb 2014 16:09:50 +0000
4Subject: Accept obsolete ssh-vulnkey configuration options
5
6These options were used as part of Debian's response to CVE-2008-0166.
7Nearly six years later, we no longer need to continue carrying the bulk
8of that patch, but we do need to avoid failing when the associated
9configuration options are still present.
10
11Last-Update: 2014-02-09
12
13Patch-Name: ssh-vulnkey-compat.patch
14---
15 readconf.c | 1 +
16 servconf.c | 1 +
17 2 files changed, 2 insertions(+)
18
19diff --git a/readconf.c b/readconf.c
20index c8e79299..1f1be778 100644
21--- a/readconf.c
22+++ b/readconf.c
23@@ -189,6 +189,7 @@ static struct {
24 { "fallbacktorsh", oDeprecated },
25 { "globalknownhostsfile2", oDeprecated },
26 { "rhostsauthentication", oDeprecated },
27+ { "useblacklistedkeys", oDeprecated },
28 { "userknownhostsfile2", oDeprecated },
29 { "useroaming", oDeprecated },
30 { "usersh", oDeprecated },
31diff --git a/servconf.c b/servconf.c
32index cbbea05b..3fff3d53 100644
33--- a/servconf.c
34+++ b/servconf.c
35@@ -576,6 +576,7 @@ static struct {
36 { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL },
37 { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL },
38 { "strictmodes", sStrictModes, SSHCFG_GLOBAL },
39+ { "permitblacklistedkeys", sDeprecated, SSHCFG_GLOBAL },
40 { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL },
41 { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL },
42 { "uselogin", sDeprecated, SSHCFG_GLOBAL },
diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch
new file mode 100644
index 000000000..897433408
--- /dev/null
+++ b/debian/patches/syslog-level-silent.patch
@@ -0,0 +1,47 @@
1From 027619c6b05713e3f08a51e7232389383900e5d8 Mon Sep 17 00:00:00 2001
2From: Jonathan David Amery <jdamery@ysolde.ucam.org>
3Date: Sun, 9 Feb 2014 16:09:54 +0000
4Subject: "LogLevel SILENT" compatibility
5
6"LogLevel SILENT" (-qq) was introduced in Debian openssh 1:3.0.1p1-1 to
7match the behaviour of non-free SSH, in which -q does not suppress fatal
8errors. However, this was unintentionally broken in 1:4.6p1-2 and nobody
9complained, so we've dropped most of it. The parts that remain are basic
10configuration file compatibility, and an adjustment to "Pseudo-terminal will
11not be allocated ..." which should be split out into a separate patch.
12
13Author: Matthew Vernon <matthew@debian.org>
14Author: Colin Watson <cjwatson@debian.org>
15Last-Update: 2013-09-14
16
17Patch-Name: syslog-level-silent.patch
18---
19 log.c | 1 +
20 ssh.c | 2 +-
21 2 files changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/log.c b/log.c
24index 99450dd1..1559091d 100644
25--- a/log.c
26+++ b/log.c
27@@ -93,6 +93,7 @@ static struct {
28 LogLevel val;
29 } log_levels[] =
30 {
31+ { "SILENT", SYSLOG_LEVEL_QUIET }, /* compatibility */
32 { "QUIET", SYSLOG_LEVEL_QUIET },
33 { "FATAL", SYSLOG_LEVEL_FATAL },
34 { "ERROR", SYSLOG_LEVEL_ERROR },
35diff --git a/ssh.c b/ssh.c
36index d3619fe2..e36debf6 100644
37--- a/ssh.c
38+++ b/ssh.c
39@@ -1252,7 +1252,7 @@ main(int ac, char **av)
40 /* Do not allocate a tty if stdin is not a tty. */
41 if ((!isatty(fileno(stdin)) || stdin_null_flag) &&
42 options.request_tty != REQUEST_TTY_FORCE) {
43- if (tty_flag)
44+ if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET)
45 logit("Pseudo-terminal will not be allocated because "
46 "stdin is not a terminal.");
47 tty_flag = 0;
diff --git a/debian/patches/systemd-readiness.patch b/debian/patches/systemd-readiness.patch
new file mode 100644
index 000000000..a0e733f1b
--- /dev/null
+++ b/debian/patches/systemd-readiness.patch
@@ -0,0 +1,84 @@
1From 4acdde3e5b206718774fa162763058155fe572bf Mon Sep 17 00:00:00 2001
2From: Michael Biebl <biebl@debian.org>
3Date: Mon, 21 Dec 2015 16:08:47 +0000
4Subject: Add systemd readiness notification support
5
6Bug-Debian: https://bugs.debian.org/778913
7Forwarded: no
8Last-Update: 2017-08-22
9
10Patch-Name: systemd-readiness.patch
11---
12 configure.ac | 24 ++++++++++++++++++++++++
13 sshd.c | 9 +++++++++
14 2 files changed, 33 insertions(+)
15
16diff --git a/configure.ac b/configure.ac
17index 3e23e60d..eac143b4 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -4496,6 +4496,29 @@ AC_ARG_WITH([kerberos5],
21 AC_SUBST([GSSLIBS])
22 AC_SUBST([K5LIBS])
23
24+# Check whether user wants systemd support
25+SYSTEMD_MSG="no"
26+AC_ARG_WITH(systemd,
27+ [ --with-systemd Enable systemd support],
28+ [ if test "x$withval" != "xno" ; then
29+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
30+ if test "$PKGCONFIG" != "no"; then
31+ AC_MSG_CHECKING([for libsystemd])
32+ if $PKGCONFIG --exists libsystemd; then
33+ SYSTEMD_CFLAGS=`$PKGCONFIG --cflags libsystemd`
34+ SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
35+ CPPFLAGS="$CPPFLAGS $SYSTEMD_CFLAGS"
36+ SSHDLIBS="$SSHDLIBS $SYSTEMD_LIBS"
37+ AC_MSG_RESULT([yes])
38+ AC_DEFINE(HAVE_SYSTEMD, 1, [Define if you want systemd support.])
39+ SYSTEMD_MSG="yes"
40+ else
41+ AC_MSG_RESULT([no])
42+ fi
43+ fi
44+ fi ]
45+)
46+
47 # Looking for programs, paths and files
48
49 PRIVSEP_PATH=/var/empty
50@@ -5303,6 +5326,7 @@ echo " libldns support: $LDNS_MSG"
51 echo " Solaris process contract support: $SPC_MSG"
52 echo " Solaris project support: $SP_MSG"
53 echo " Solaris privilege support: $SPP_MSG"
54+echo " systemd support: $SYSTEMD_MSG"
55 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
56 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
57 echo " BSD Auth support: $BSD_AUTH_MSG"
58diff --git a/sshd.c b/sshd.c
59index 1d645a17..3a86e66e 100644
60--- a/sshd.c
61+++ b/sshd.c
62@@ -85,6 +85,10 @@
63 #include <prot.h>
64 #endif
65
66+#ifdef HAVE_SYSTEMD
67+#include <systemd/sd-daemon.h>
68+#endif
69+
70 #include "xmalloc.h"
71 #include "ssh.h"
72 #include "ssh2.h"
73@@ -1933,6 +1937,11 @@ main(int ac, char **av)
74 }
75 }
76
77+#ifdef HAVE_SYSTEMD
78+ /* Signal systemd that we are ready to accept connections */
79+ sd_notify(0, "READY=1");
80+#endif
81+
82 /* Accept a connection and return in a forked child */
83 server_accept_loop(&sock_in, &sock_out,
84 &newsock, config_s);
diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch
new file mode 100644
index 000000000..a7201b318
--- /dev/null
+++ b/debian/patches/user-group-modes.patch
@@ -0,0 +1,210 @@
1From 9e45701c5d6105444cc2f4f5d6c44b0f69969479 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@debian.org>
3Date: Sun, 9 Feb 2014 16:09:58 +0000
4Subject: Allow harmless group-writability
5
6Allow secure files (~/.ssh/config, ~/.ssh/authorized_keys, etc.) to be
7group-writable, provided that the group in question contains only the file's
8owner. Rejected upstream for IMO incorrect reasons (e.g. a misunderstanding
9about the contents of gr->gr_mem). Given that per-user groups and umask 002
10are the default setup in Debian (for good reasons - this makes operating in
11setgid directories with other groups much easier), we need to permit this by
12default.
13
14Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1060
15Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314347
16Last-Update: 2017-10-04
17
18Patch-Name: user-group-modes.patch
19---
20 auth-rhosts.c | 6 ++----
21 auth.c | 3 +--
22 misc.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
23 misc.h | 2 ++
24 readconf.c | 3 +--
25 ssh.1 | 2 ++
26 ssh_config.5 | 2 ++
27 7 files changed, 63 insertions(+), 13 deletions(-)
28
29diff --git a/auth-rhosts.c b/auth-rhosts.c
30index ecf956f0..4dccd5e6 100644
31--- a/auth-rhosts.c
32+++ b/auth-rhosts.c
33@@ -261,8 +261,7 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
34 return 0;
35 }
36 if (options.strict_modes &&
37- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
38- (st.st_mode & 022) != 0)) {
39+ !secure_permissions(&st, pw->pw_uid)) {
40 logit("Rhosts authentication refused for %.100s: "
41 "bad ownership or modes for home directory.", pw->pw_name);
42 auth_debug_add("Rhosts authentication refused for %.100s: "
43@@ -288,8 +287,7 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
44 * allowing access to their account by anyone.
45 */
46 if (options.strict_modes &&
47- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
48- (st.st_mode & 022) != 0)) {
49+ !secure_permissions(&st, pw->pw_uid)) {
50 logit("Rhosts authentication refused for %.100s: bad modes for %.200s",
51 pw->pw_name, buf);
52 auth_debug_add("Bad file modes for %.200s", buf);
53diff --git a/auth.c b/auth.c
54index 76d586e3..68b9fe79 100644
55--- a/auth.c
56+++ b/auth.c
57@@ -468,8 +468,7 @@ check_key_in_hostfiles(struct passwd *pw, struct sshkey *key, const char *host,
58 user_hostfile = tilde_expand_filename(userfile, pw->pw_uid);
59 if (options.strict_modes &&
60 (stat(user_hostfile, &st) == 0) &&
61- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
62- (st.st_mode & 022) != 0)) {
63+ !secure_permissions(&st, pw->pw_uid)) {
64 logit("Authentication refused for %.100s: "
65 "bad owner or modes for %.200s",
66 pw->pw_name, user_hostfile);
67diff --git a/misc.c b/misc.c
68index 874dcc8a..75c4113f 100644
69--- a/misc.c
70+++ b/misc.c
71@@ -57,8 +57,9 @@
72 #include <netdb.h>
73 #ifdef HAVE_PATHS_H
74 # include <paths.h>
75-#include <pwd.h>
76 #endif
77+#include <pwd.h>
78+#include <grp.h>
79 #ifdef SSH_TUN_OPENBSD
80 #include <net/if.h>
81 #endif
82@@ -1030,6 +1031,55 @@ read_keyfile_line(FILE *f, const char *filename, char *buf, size_t bufsz,
83 return -1;
84 }
85
86+int
87+secure_permissions(struct stat *st, uid_t uid)
88+{
89+ if (!platform_sys_dir_uid(st->st_uid) && st->st_uid != uid)
90+ return 0;
91+ if ((st->st_mode & 002) != 0)
92+ return 0;
93+ if ((st->st_mode & 020) != 0) {
94+ /* If the file is group-writable, the group in question must
95+ * have exactly one member, namely the file's owner.
96+ * (Zero-member groups are typically used by setgid
97+ * binaries, and are unlikely to be suitable.)
98+ */
99+ struct passwd *pw;
100+ struct group *gr;
101+ int members = 0;
102+
103+ gr = getgrgid(st->st_gid);
104+ if (!gr)
105+ return 0;
106+
107+ /* Check primary group memberships. */
108+ while ((pw = getpwent()) != NULL) {
109+ if (pw->pw_gid == gr->gr_gid) {
110+ ++members;
111+ if (pw->pw_uid != uid)
112+ return 0;
113+ }
114+ }
115+ endpwent();
116+
117+ pw = getpwuid(st->st_uid);
118+ if (!pw)
119+ return 0;
120+
121+ /* Check supplementary group memberships. */
122+ if (gr->gr_mem[0]) {
123+ ++members;
124+ if (strcmp(pw->pw_name, gr->gr_mem[0]) ||
125+ gr->gr_mem[1])
126+ return 0;
127+ }
128+
129+ if (!members)
130+ return 0;
131+ }
132+ return 1;
133+}
134+
135 int
136 tun_open(int tun, int mode, char **ifname)
137 {
138@@ -1797,8 +1847,7 @@ safe_path(const char *name, struct stat *stp, const char *pw_dir,
139 snprintf(err, errlen, "%s is not a regular file", buf);
140 return -1;
141 }
142- if ((!platform_sys_dir_uid(stp->st_uid) && stp->st_uid != uid) ||
143- (stp->st_mode & 022) != 0) {
144+ if (!secure_permissions(stp, uid)) {
145 snprintf(err, errlen, "bad ownership or modes for file %s",
146 buf);
147 return -1;
148@@ -1813,8 +1862,7 @@ safe_path(const char *name, struct stat *stp, const char *pw_dir,
149 strlcpy(buf, cp, sizeof(buf));
150
151 if (stat(buf, &st) < 0 ||
152- (!platform_sys_dir_uid(st.st_uid) && st.st_uid != uid) ||
153- (st.st_mode & 022) != 0) {
154+ !secure_permissions(&st, uid)) {
155 snprintf(err, errlen,
156 "bad ownership or modes for directory %s", buf);
157 return -1;
158diff --git a/misc.h b/misc.h
159index cdafea73..51943db9 100644
160--- a/misc.h
161+++ b/misc.h
162@@ -168,6 +168,8 @@ char *read_passphrase(const char *, int);
163 int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
164 int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *);
165
166+int secure_permissions(struct stat *st, uid_t uid);
167+
168 #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
169 #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
170 #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
171diff --git a/readconf.c b/readconf.c
172index 7f2b5c17..50349e23 100644
173--- a/readconf.c
174+++ b/readconf.c
175@@ -1741,8 +1741,7 @@ read_config_file_depth(const char *filename, struct passwd *pw,
176
177 if (fstat(fileno(f), &sb) == -1)
178 fatal("fstat %s: %s", filename, strerror(errno));
179- if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
180- (sb.st_mode & 022) != 0))
181+ if (!secure_permissions(&sb, getuid()))
182 fatal("Bad owner or permissions on %s", filename);
183 }
184
185diff --git a/ssh.1 b/ssh.1
186index b4078525..0ef7c170 100644
187--- a/ssh.1
188+++ b/ssh.1
189@@ -1471,6 +1471,8 @@ The file format and configuration options are described in
190 .Xr ssh_config 5 .
191 Because of the potential for abuse, this file must have strict permissions:
192 read/write for the user, and not writable by others.
193+It may be group-writable provided that the group in question contains only
194+the user.
195 .Pp
196 .It Pa ~/.ssh/environment
197 Contains additional definitions for environment variables; see
198diff --git a/ssh_config.5 b/ssh_config.5
199index 32c3632c..84dcd52c 100644
200--- a/ssh_config.5
201+++ b/ssh_config.5
202@@ -1818,6 +1818,8 @@ The format of this file is described above.
203 This file is used by the SSH client.
204 Because of the potential for abuse, this file must have strict permissions:
205 read/write for the user, and not accessible by others.
206+It may be group-writable provided that the group in question contains only
207+the user.
208 .It Pa /etc/ssh/ssh_config
209 Systemwide configuration file.
210 This file provides defaults for those
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 000000000..c619f3451
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
[type: gettext/rfc822deb] openssh-server.templates
diff --git a/debian/po/cs.po b/debian/po/cs.po
new file mode 100644
index 000000000..d01e0ffdc
--- /dev/null
+++ b/debian/po/cs.po
@@ -0,0 +1,55 @@
1# Czech PO debconf template translation of openssh.
2# Copyright (C) 2014 Michal Simunek <michal.simunek@gmail.com>
3# This file is distributed under the same license as the openssh package.
4# Michal Simunek <michal.simunek@gmail.com>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh 1:6.6p1-1\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-06-12 12:25+0200\n"
12"Last-Translator: Michal Simunek <michal.simunek@gmail.com>\n"
13"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
14"Language: cs\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=utf-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18
19#. Type: boolean
20#. Description
21#: ../openssh-server.templates:1001
22msgid "Disable SSH password authentication for root?"
23msgstr "Zakázat ověřování heslem pro uživatele root?"
24
25#. Type: boolean
26#. Description
27#: ../openssh-server.templates:1001
28msgid ""
29"Previous versions of openssh-server permitted logging in as root over SSH "
30"using password authentication. The default for new installations is now "
31"\"PermitRootLogin prohibit-password\", which disables password "
32"authentication for root without breaking systems that have explicitly "
33"configured SSH public key authentication for root."
34msgstr ""
35"Předchozí verze openssh-server dovolovala přihlašovat se přes SSH jako root "
36"pomocí ověřování heslem. Výchozí volba pro nové instalace je nyní "
37"\"PermitRootLogin prohibit-password\", která zakazuje ověřování heslem pro "
38"uživatele root, aniž by to omezilo systémy, které mají explicitně nastaveno "
39"ověřování veřejným SSH klíčem pro uživatele root."
40
41#. Type: boolean
42#. Description
43#: ../openssh-server.templates:1001
44msgid ""
45"This change makes systems more secure against brute-force password "
46"dictionary attacks on the root user (a very common target for such attacks). "
47"However, it may break systems that are set up with the expectation of being "
48"able to SSH as root using password authentication. You should only make this "
49"change if you do not need to do that."
50msgstr ""
51"Tato změna činí systémy zabezpečenějšími proti útokům hrubou silou na heslo "
52"uživatele root pomocí slovníku (velmi častý cíl útoků). Nicméně, to může "
53"poškodit systémy, které jsou nastaveny s předpokladem, že bude možné se "
54"přihlašovat přes SSH jako root pomocí ověřování heslem. Změnu této volby "
55"byste měli provést pouze pokud ověřování heslem potřebujete."
diff --git a/debian/po/da.po b/debian/po/da.po
new file mode 100644
index 000000000..70d576d7b
--- /dev/null
+++ b/debian/po/da.po
@@ -0,0 +1,55 @@
1# Danish translation openssh.
2# Copyright (C) 2014 openssh og nedenstående oversættere.
3# This file is distributed under the same license as the openssh package.
4# Joe Hansen <joedalton2@yahoo.dk>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-03-21 23:51+0200\n"
12"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
13"Language-Team: Danish <debian-l10n-danish@lists.debian.org>\n"
14"Language: da\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18
19#. Type: boolean
20#. Description
21#: ../openssh-server.templates:1001
22msgid "Disable SSH password authentication for root?"
23msgstr "Deaktiver SSH-adgangskodegodkendelse for root?"
24
25#. Type: boolean
26#. Description
27#: ../openssh-server.templates:1001
28msgid ""
29"Previous versions of openssh-server permitted logging in as root over SSH "
30"using password authentication. The default for new installations is now "
31"\"PermitRootLogin prohibit-password\", which disables password "
32"authentication for root without breaking systems that have explicitly "
33"configured SSH public key authentication for root."
34msgstr ""
35"Tidligere versioner af openssh-server tillod indlogning som root over SSH "
36"med brug af adgangskodegodkendelse. Standarden for nye installationer er nu "
37"»PermitRootLogin prohibit-password«, som deaktiverer adgangskodegodkendelse "
38"for root uden at ødelægge systemer, som eksplicit har konfigureret SSH-"
39"offentlig nøglegodkendelse for root."
40
41#. Type: boolean
42#. Description
43#: ../openssh-server.templates:1001
44msgid ""
45"This change makes systems more secure against brute-force password "
46"dictionary attacks on the root user (a very common target for such attacks). "
47"However, it may break systems that are set up with the expectation of being "
48"able to SSH as root using password authentication. You should only make this "
49"change if you do not need to do that."
50msgstr ""
51"Denne ændring gør systemer mere sikre mod brute-force angreb vis ordlister "
52"med adgangskoder på root-brugeren (et meget ofte mål for sådanne angreb). "
53"Det kan dog ødelægge systemer, som er opsat med forventning om at kunne SSH "
54"som root via brug af adgangskodegodkendelse. Du skal kun lave denne ændring, "
55"hvis du ikke har brug for dette."
diff --git a/debian/po/de.po b/debian/po/de.po
new file mode 100644
index 000000000..ecba54b6c
--- /dev/null
+++ b/debian/po/de.po
@@ -0,0 +1,61 @@
1# openssh.
2# Copyright (C) 2014 Colin Watson
3# Copyright (C) 2014 Stephan Beck
4# This file is distributed under the same license as the openssh package.
5# Stephan Beck <sbeck@mailbox.org>, 2014.
6#
7msgid ""
8msgstr ""
9"Project-Id-Version: openssh_1:6.6p1-1\n"
10"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
11"POT-Creation-Date: 2014-03-20 02:06+0000\n"
12"PO-Revision-Date: 2014-03-24 22:21+0100\n"
13"Last-Translator: Stephan Beck <sbeck@mailbox.org>\n"
14"Language-Team: Debian German translation team <debian-l10n-german@lists."
15"debian.org>\n"
16"Language: de\n"
17"MIME-Version: 1.0\n"
18"Content-Type: text/plain; charset=UTF-8\n"
19"Content-Transfer-Encoding: 8bit\n"
20
21#. Type: boolean
22#. Description
23#: ../openssh-server.templates:1001
24msgid "Disable SSH password authentication for root?"
25msgstr "SSH Passwort-Authentifizierung für »root« deaktivieren?"
26
27#. Type: boolean
28#. Description
29#: ../openssh-server.templates:1001
30msgid ""
31"Previous versions of openssh-server permitted logging in as root over SSH "
32"using password authentication. The default for new installations is now "
33"\"PermitRootLogin prohibit-password\", which disables password "
34"authentication for root without breaking systems that have explicitly "
35"configured SSH public key authentication for root."
36msgstr ""
37"Vorherige Versionen von openssh-server erlaubten das Anmelden als »root« "
38"über SSH unter Verwendung von Passwort-Authentifizierung. Die "
39"Standardeinstellung für Neuinstallationen lautet nun »PermitRootLogin "
40"prohibit-password«, wodurch die Passwort-Authentifizierung für »root« "
41"deaktiviert wird, und Systeme dennoch funktionsfähig bleiben, bei denen "
42"ausdrücklich die Authentifizierung als »root« mittels öffentlichem SSH-"
43"Schlüssel konfiguriert ist."
44
45#. Type: boolean
46#. Description
47#: ../openssh-server.templates:1001
48msgid ""
49"This change makes systems more secure against brute-force password "
50"dictionary attacks on the root user (a very common target for such attacks). "
51"However, it may break systems that are set up with the expectation of being "
52"able to SSH as root using password authentication. You should only make this "
53"change if you do not need to do that."
54msgstr ""
55"Diese Änderung sichert Systeme besser gegen jene Angriffe auf den Benutzer "
56"»root« (ein verbreitetes Ziel solcher Angriffe) ab, die das Passwort durch "
57"simples Ausprobieren aller Einträge von Wörterbüchern zu erraten versuchen. "
58"Sie kann allerdings dazu führen, dass Systeme nicht mehr funktionieren, die "
59"in der Absicht konfiguriert wurden, die Anmeldung als »root« über SSH unter "
60"Verwendung von Passwort-Authentifizierung zuzulassen. Sie sollten diese "
61"Änderung nur vornehmen, wenn Sie auf Letzteres verzichten können."
diff --git a/debian/po/es.po b/debian/po/es.po
new file mode 100644
index 000000000..de8a67ace
--- /dev/null
+++ b/debian/po/es.po
@@ -0,0 +1,80 @@
1# openssh po-debconf translation to Spanish
2# Copyright (C) 2014 Software in the Public Interest
3# This file is distributed under the same license as the openssh package.
4#
5# Changes:
6# - Initial translation
7# Matías A. Bellone <matiasbellone+debian@gmail.com>, 2014
8#
9# Traductores, si no conocen el formato PO, merece la pena leer la
10# de gettext, especialmente las secciones dedicadas a este
11# formato, por ejemplo ejecutando:
12# info -n '(gettext)PO Files'
13# info -n '(gettext)Header Entry'
14#
15# Equipo de traducción al español, por favor, lean antes de traducir
16# los siguientes documentos:
17#
18# - El proyecto de traducción de Debian al español
19# http://www.debian.org/intl/spanish/
20# especialmente las notas de traducción en
21# http://www.debian.org/intl/spanish/notas
22#
23# - La guía de traducción de po's de debconf:
24# /usr/share/doc/po-debconf/README-trans
25# o http://www.debian.org/intl/l10n/po-debconf/README-trans
26#
27msgid ""
28msgstr ""
29"Project-Id-Version: openssh\n"
30"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
31"POT-Creation-Date: 2014-03-20 02:06+0000\n"
32"PO-Revision-Date: 2014-03-23 20:43-0300\n"
33"Last-Translator: Matías Bellone <matiasbellone+debian@gmail.com>\n"
34"Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
35"Language: es\n"
36"MIME-Version: 1.0\n"
37"Content-Type: text/plain; charset=UTF-8\n"
38"Content-Transfer-Encoding: 8bit\n"
39
40#. Type: boolean
41#. Description
42#: ../openssh-server.templates:1001
43msgid "Disable SSH password authentication for root?"
44msgstr ""
45"¿Desea desactivar la autenticación SSH mediante contraseña para el usuario "
46"root?"
47
48#. Type: boolean
49#. Description
50#: ../openssh-server.templates:1001
51msgid ""
52"Previous versions of openssh-server permitted logging in as root over SSH "
53"using password authentication. The default for new installations is now "
54"\"PermitRootLogin prohibit-password\", which disables password "
55"authentication for root without breaking systems that have explicitly "
56"configured SSH public key authentication for root."
57msgstr ""
58"Las versiones anteriores de openssh-server permitían iniciar sesión como "
59"usuario root utilizando autenticación con contraseña. La configuración "
60"predeterminada para las nuevas instalaciones ahora incluye «PermitRootLogin "
61"prohibit-password», lo que desactiva la autenticación con contraseña para el "
62"usuario root sin romper los sistemas que tienen configurado explícitamente "
63"la autenticación SSH utilizando claves públicas para el usuario root."
64
65#. Type: boolean
66#. Description
67#: ../openssh-server.templates:1001
68msgid ""
69"This change makes systems more secure against brute-force password "
70"dictionary attacks on the root user (a very common target for such attacks). "
71"However, it may break systems that are set up with the expectation of being "
72"able to SSH as root using password authentication. You should only make this "
73"change if you do not need to do that."
74msgstr ""
75"Este cambio hace que los sistemas sean más resistentes contra ataques de "
76"fuerza bruta basados en diccionarios sobre el usuario root (un objetivo muy "
77"común para este tipo de ataques). Sin embargo, podría romper sistemas cuya "
78"configuración permite que el usuario root inicie sesión a través de SSH "
79"utilizando una contraseña. Sólo debería realizar este cambio si no necesita "
80"este comportamiento."
diff --git a/debian/po/fr.po b/debian/po/fr.po
new file mode 100644
index 000000000..f7125e9a3
--- /dev/null
+++ b/debian/po/fr.po
@@ -0,0 +1,59 @@
1# Translation of openssh debconf template to French
2# Copyright (C) 2014
3# This file is distributed under the same license as the openssh package.
4# Étienne Gilli <etienne.gilli@gmail.com>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh_1:6.5p1-6\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-03-22 08:26+0100\n"
12"Last-Translator: Étienne Gilli <etienne.gilli@gmail.com>\n"
13"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
14"Language: fr\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18
19#. Type: boolean
20#. Description
21#: ../openssh-server.templates:1001
22msgid "Disable SSH password authentication for root?"
23msgstr ""
24"Désactiver l’authentification SSH par mot de passe pour le superutilisateur ?"
25
26#. Type: boolean
27#. Description
28#: ../openssh-server.templates:1001
29msgid ""
30"Previous versions of openssh-server permitted logging in as root over SSH "
31"using password authentication. The default for new installations is now "
32"\"PermitRootLogin prohibit-password\", which disables password "
33"authentication for root without breaking systems that have explicitly "
34"configured SSH public key authentication for root."
35msgstr ""
36"Les versions précédentes du paquet openssh-server autorisaient la connexion "
37"par SSH du superutilisateur (root) en utilisant l’authentification par mot "
38"de passe. Par défaut, les nouvelles installations ont maintenant l’option "
39"« PermitRootLogin prohibit-password », qui désactive l’authentification par "
40"mot de passe pour le compte « root », sans casser les systèmes qui ont "
41"configuré explicitement l’authentification SSH par clé publique pour ce "
42"compte."
43
44#. Type: boolean
45#. Description
46#: ../openssh-server.templates:1001
47msgid ""
48"This change makes systems more secure against brute-force password "
49"dictionary attacks on the root user (a very common target for such attacks). "
50"However, it may break systems that are set up with the expectation of being "
51"able to SSH as root using password authentication. You should only make this "
52"change if you do not need to do that."
53msgstr ""
54"Cette modification rend les systèmes plus robustes face aux attaques par "
55"force brute et par dictionnaire contre le superutilisateur (très souvent "
56"pris pour cible par ce type d’attaque). Cependant, cela peut rendre "
57"inutilisables les systèmes reposant sur la possibilité de se connecter au "
58"compte « root » par SSH avec authentification par mot de passe. Vous ne "
59"devriez appliquer cette modification que si ce n’est pas votre cas."
diff --git a/debian/po/it.po b/debian/po/it.po
new file mode 100644
index 000000000..dd7106090
--- /dev/null
+++ b/debian/po/it.po
@@ -0,0 +1,58 @@
1# Italian translation of openssh debconf messages.
2# Copyright (C) 2014, openssh package copyright holder
3# This file is distributed under the same license as the openssh package.
4# Beatrice Torracca <beatricet@libero.it>, 2014.
5msgid ""
6msgstr ""
7"Project-Id-Version: openssh\n"
8"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
9"POT-Creation-Date: 2014-03-20 02:06+0000\n"
10"PO-Revision-Date: 2014-03-28 11:12+0200\n"
11"Last-Translator: Beatrice Torracca <beatricet@libero.it>\n"
12"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
13"Language: it\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18"X-Generator: Virtaal 0.7.1\n"
19
20#. Type: boolean
21#. Description
22#: ../openssh-server.templates:1001
23msgid "Disable SSH password authentication for root?"
24msgstr "Disabilitare l'autenticazione SSH con password per root?"
25
26#. Type: boolean
27#. Description
28#: ../openssh-server.templates:1001
29msgid ""
30"Previous versions of openssh-server permitted logging in as root over SSH "
31"using password authentication. The default for new installations is now "
32"\"PermitRootLogin prohibit-password\", which disables password "
33"authentication for root without breaking systems that have explicitly "
34"configured SSH public key authentication for root."
35msgstr ""
36"Le versioni precedenti di openssh-server permettevano il login come root via "
37"SSH, usando l'autenticazione con password. Il comportamento predefinito "
38"delle nuove installazioni è «PermitRootLogin prohibit-password» che "
39"disabilita l'autenticazione con password per root, senza rendere non "
40"funzionanti sistemi che hanno esplicitamente configurato l'autenticazione "
41"SSH con chiave pubblica per root."
42
43#. Type: boolean
44#. Description
45#: ../openssh-server.templates:1001
46msgid ""
47"This change makes systems more secure against brute-force password "
48"dictionary attacks on the root user (a very common target for such attacks). "
49"However, it may break systems that are set up with the expectation of being "
50"able to SSH as root using password authentication. You should only make this "
51"change if you do not need to do that."
52msgstr ""
53"Questo cambiamento rende i sistemi più al sicuro da attacchi di forza bruta "
54"a dizionario sulle password per l'utente root (un obiettivo molto comune per "
55"tali attacchi). Tuttavia, può rendere non funzionanti sistemi che sono "
56"impostati facendo affidamento sulla possibilità di autenticazione SSH come "
57"root usando la password. Si dovrebbe fare questo cambiamento solo se non si "
58"ha bisogno di tale comportamento."
diff --git a/debian/po/ja.po b/debian/po/ja.po
new file mode 100644
index 000000000..db382f19a
--- /dev/null
+++ b/debian/po/ja.po
@@ -0,0 +1,55 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the openssh package.
4# victory <victory.deb@gmail.com>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-03-20 11:06+0900\n"
12"Last-Translator: victory <victory.deb@gmail.com>\n"
13"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
14"Language: ja\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18
19#. Type: boolean
20#. Description
21#: ../openssh-server.templates:1001
22msgid "Disable SSH password authentication for root?"
23msgstr "root での SSH パスワード認証を無効にしますか?"
24
25#. Type: boolean
26#. Description
27#: ../openssh-server.templates:1001
28msgid ""
29"Previous versions of openssh-server permitted logging in as root over SSH "
30"using password authentication. The default for new installations is now "
31"\"PermitRootLogin prohibit-password\", which disables password "
32"authentication for root without breaking systems that have explicitly "
33"configured SSH public key authentication for root."
34msgstr ""
35"openssh-server の以前のバージョンではパスワード認証を利用した SSH 経由の "
36"root のログインを許可していました。新しくインストールした場合のデフォルト値が"
37"現在は「PermitRootLogin prohibit-password」になり、root のパスワード認証を無"
38"効化しますが SSH の公開鍵認証を root 用に明示的に設定しているシステムでは特に"
39"問題はありません。"
40
41#. Type: boolean
42#. Description
43#: ../openssh-server.templates:1001
44msgid ""
45"This change makes systems more secure against brute-force password "
46"dictionary attacks on the root user (a very common target for such attacks). "
47"However, it may break systems that are set up with the expectation of being "
48"able to SSH as root using password authentication. You should only make this "
49"change if you do not need to do that."
50msgstr ""
51"この変更によりシステムは root ユーザ (こういった攻撃ではとても一般的な攻撃対"
52"象です) へのブルートフォースによるパスワード辞書攻撃に対してはより安全になり"
53"ます。しかしパスワード認証により root で SSH 接続できることを前提として構成し"
54"たシステムでは問題が発生する可能性があります。そういった必要のない場合にのみ"
55"この変更を行うようにしてください。"
diff --git a/debian/po/nl.po b/debian/po/nl.po
new file mode 100644
index 000000000..3afd6171e
--- /dev/null
+++ b/debian/po/nl.po
@@ -0,0 +1,60 @@
1# Dutch translation of openssh debconf templates.
2# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the openssh package.
4# Frans Spiesschaert <Frans.Spiesschaert@yucom.be>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-10-03 23:54+0200\n"
12"Last-Translator: Frans Spiesschaert <Frans.Spiesschaert@yucom.be>\n"
13"Language-Team: Debian Dutch l10n Team <debian-l10n-dutch@lists.debian.org>\n"
14"Language: nl\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
20#. Type: boolean
21#. Description
22#: ../openssh-server.templates:1001
23msgid "Disable SSH password authentication for root?"
24msgstr ""
25"Wachtwoordauthenticatie over SSH voor de systeembeheerder uitschakelen?"
26
27#. Type: boolean
28#. Description
29#: ../openssh-server.templates:1001
30msgid ""
31"Previous versions of openssh-server permitted logging in as root over SSH "
32"using password authentication. The default for new installations is now "
33"\"PermitRootLogin prohibit-password\", which disables password "
34"authentication for root without breaking systems that have explicitly "
35"configured SSH public key authentication for root."
36msgstr ""
37"Eerdere versies van de openssh-server lieten de systeembeheerder toe om zich "
38"over SSH te authenticeren met een wachtwoord. Voor nieuwe installaties is de "
39"standaard nu \"PermitRootLogin prohibit-password\". Deze standaardinstelling "
40"maakt het voor de systeembeheerder onmogelijk om zich via een wachtwoord te "
41"authenticeren. Deze instelling heeft geen impact op systemen waarbij de SSH-"
42"configuratie expliciet vereist dat de systeembeheerder zich authenticeert "
43"via een publieke sleutel."
44
45#. Type: boolean
46#. Description
47#: ../openssh-server.templates:1001
48msgid ""
49"This change makes systems more secure against brute-force password "
50"dictionary attacks on the root user (a very common target for such attacks). "
51"However, it may break systems that are set up with the expectation of being "
52"able to SSH as root using password authentication. You should only make this "
53"change if you do not need to do that."
54msgstr ""
55"Deze wijziging maakt systemen veiliger tegenover aanvallen met brute kracht "
56"(met een wachtwoordenwoordenboek) op de systeembeheerder, een zeer courant "
57"doelwit voor zulke aanvallen. Maar het kan systemen onbruikbaar maken die "
58"ingesteld werden vanuit de verwachting dat de systeembeheerder SSH kan "
59"gebruiken met authenticatie via wachtwoord. Enkel wanneer u dit laatste niet "
60"nodig heeft, zou u deze wijziging kunnen doorvoeren."
diff --git a/debian/po/pt.po b/debian/po/pt.po
new file mode 100644
index 000000000..2dab84ccf
--- /dev/null
+++ b/debian/po/pt.po
@@ -0,0 +1,59 @@
1# Translation of openssh's debconf messages to European Portuguese
2# Copyright (C) 2014 YEAR THE openssh'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the openssh package.
4#
5# Américo Monteiro <a_monteiro@gmx.com>, 2014.
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh 1:6.6p1-1\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-03-21 21:13+0000\n"
12"Last-Translator: Américo Monteiro <a_monteiro@gmx.com>\n"
13"Language-Team: Portuguese <traduz@debianpt.org>\n"
14"Language: pt\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19"X-Generator: Lokalize 1.4\n"
20
21#. Type: boolean
22#. Description
23#: ../openssh-server.templates:1001
24msgid "Disable SSH password authentication for root?"
25msgstr "Desactivar a autenticação SSH por palavra passe para o root?"
26
27#. Type: boolean
28#. Description
29#: ../openssh-server.templates:1001
30msgid ""
31"Previous versions of openssh-server permitted logging in as root over SSH "
32"using password authentication. The default for new installations is now "
33"\"PermitRootLogin prohibit-password\", which disables password "
34"authentication for root without breaking systems that have explicitly "
35"configured SSH public key authentication for root."
36msgstr ""
37"As versões anteriores do servidor openssh permitiam iniciar sessão como root "
38"sobre SSH usando autenticação por palavra-passe. A predefinição para novas "
39"instalações é agora \"PermitRootLogin prohibit-password\", a qual desactiva "
40"a autenticação por palavra-passe para o root sem danificar os sistemas que "
41"têm configurados explicitamente autenticação SSH por chave pública para o "
42"root."
43
44#. Type: boolean
45#. Description
46#: ../openssh-server.templates:1001
47msgid ""
48"This change makes systems more secure against brute-force password "
49"dictionary attacks on the root user (a very common target for such attacks). "
50"However, it may break systems that are set up with the expectation of being "
51"able to SSH as root using password authentication. You should only make this "
52"change if you do not need to do that."
53msgstr ""
54"Esta alteração torna os sistemas mais seguros contra ataques em que se "
55"forçam dicionários de palavras-passe no utilizador root (um alvo muito comum "
56"para tais ataques). No entanto, pode danificar sistemas que estão "
57"configurados com a expectativa de serem capazes de SSH como root usando "
58"autenticação por palavra-passe. Apenas deverá fazer esta alteração se não "
59"precisa de tal método de autenticação."
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
new file mode 100644
index 000000000..99b1182f1
--- /dev/null
+++ b/debian/po/pt_BR.po
@@ -0,0 +1,57 @@
1# Debconf translations for openssh.
2# Copyright (C) 2014 THE openssh'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the openssh package.
4# José de Figueiredo <deb.gnulinux@gmail.com>, 2014.
5#
6#
7msgid ""
8msgstr ""
9"Project-Id-Version: openssh\n"
10"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
11"POT-Creation-Date: 2014-03-20 02:06+0000\n"
12"PO-Revision-Date: 2014-11-23 23:49-0200\n"
13"Last-Translator: José de Figueiredo <deb.gnulinux@gmail.com>\n"
14"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
15"org>\n"
16"Language: pt_BR\n"
17"MIME-Version: 1.0\n"
18"Content-Type: text/plain; charset=UTF-8\n"
19"Content-Transfer-Encoding: 8bit\n"
20
21#. Type: boolean
22#. Description
23#: ../openssh-server.templates:1001
24msgid "Disable SSH password authentication for root?"
25msgstr "Desabilitar autenticação por senha do SSH para root?"
26
27#. Type: boolean
28#. Description
29#: ../openssh-server.templates:1001
30msgid ""
31"Previous versions of openssh-server permitted logging in as root over SSH "
32"using password authentication. The default for new installations is now "
33"\"PermitRootLogin prohibit-password\", which disables password "
34"authentication for root without breaking systems that have explicitly "
35"configured SSH public key authentication for root."
36msgstr ""
37"Versões anteriores do openssh-server permitiam login como root sobre SSH "
38"usando autenticação por senha. O padrão para as novas instalações agora é "
39"\"PermitRootLogin prohibit-password\", que desabilita a autenticação por "
40"senha para root sem quebrar sistemas que tenham configurado explicitamente o "
41"SSH para autenticação por chave pública para root."
42
43#. Type: boolean
44#. Description
45#: ../openssh-server.templates:1001
46msgid ""
47"This change makes systems more secure against brute-force password "
48"dictionary attacks on the root user (a very common target for such attacks). "
49"However, it may break systems that are set up with the expectation of being "
50"able to SSH as root using password authentication. You should only make this "
51"change if you do not need to do that."
52msgstr ""
53"Esta alteração torna sistemas mais seguros contra ataques de força bruta por "
54"dicionário de senhas no usuário root (um alvo muito comum destes ataques). "
55"Entretanto, ela pode quebrar sistemas que foram configurados com a "
56"expectativa de acesso SSH com root usando autenticação por senha. Você deve "
57"fazer esta mudança somente se você não precisa fazer isso."
diff --git a/debian/po/ru.po b/debian/po/ru.po
new file mode 100644
index 000000000..f2e1dafc4
--- /dev/null
+++ b/debian/po/ru.po
@@ -0,0 +1,57 @@
1# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
2# This file is distributed under the same license as the openssh package.
3#
4# Yuri Kozlov <yuray@komyakino.ru>, 2014.
5msgid ""
6msgstr ""
7"Project-Id-Version: openssh 1:6.6p1-1\n"
8"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
9"POT-Creation-Date: 2014-03-20 02:06+0000\n"
10"PO-Revision-Date: 2014-03-22 10:04+0400\n"
11"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
12"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
13"Language: ru\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
18"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
19"X-Generator: Lokalize 1.4\n"
20
21#. Type: boolean
22#. Description
23#: ../openssh-server.templates:1001
24msgid "Disable SSH password authentication for root?"
25msgstr "Выключить в SSH аутентификацию по паролю для root?"
26
27#. Type: boolean
28#. Description
29#: ../openssh-server.templates:1001
30msgid ""
31"Previous versions of openssh-server permitted logging in as root over SSH "
32"using password authentication. The default for new installations is now "
33"\"PermitRootLogin prohibit-password\", which disables password "
34"authentication for root without breaking systems that have explicitly "
35"configured SSH public key authentication for root."
36msgstr ""
37"В предыдущих версиях openssh-server разрешён вход с правами пользователя "
38"root через SSH с помощью аутентификации по паролю. При новых установках по "
39"умолчанию теперь используется настройка «PermitRootLogin prohibit-password», "
40"которая отключает аутентификацию по паролю для root, что не вредит системам, "
41"у которых в SSH для root настроена аутентификация по открытому ключу."
42
43#. Type: boolean
44#. Description
45#: ../openssh-server.templates:1001
46msgid ""
47"This change makes systems more secure against brute-force password "
48"dictionary attacks on the root user (a very common target for such attacks). "
49"However, it may break systems that are set up with the expectation of being "
50"able to SSH as root using password authentication. You should only make this "
51"change if you do not need to do that."
52msgstr ""
53"Это изменение делает системы более стойкими к атакам методом перебора "
54"словарных паролей для пользователя root (самая распространённая цель таких "
55"атак). Однако, это вредит системам, в которых специально настроен вход для "
56"root по SSH с парольной аутентификацией. Если это не ваш случай, то ответьте "
57"утвердительно."
diff --git a/debian/po/sv.po b/debian/po/sv.po
new file mode 100644
index 000000000..278b0ccbf
--- /dev/null
+++ b/debian/po/sv.po
@@ -0,0 +1,58 @@
1# Swedish translations for openssh package
2# Svenska översättningar för paket openssh.
3# Copyright (C) 2014 THE openssh'S COPYRIGHT HOLDER
4# This file is distributed under the same license as the openssh package.
5# Andreas Rönnquist <gusnan@gusnan.se>, 2014.
6#
7msgid ""
8msgstr ""
9"Project-Id-Version: openssh\n"
10"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
11"POT-Creation-Date: 2014-03-20 02:06+0000\n"
12"PO-Revision-Date: 2014-03-21 21:36+0100\n"
13"Last-Translator: Andreas Rönnquist <gusnan@gusnan.se>\n"
14"Language-Team: Swedish\n"
15"Language: sv\n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"
19"Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
21#. Type: boolean
22#. Description
23#: ../openssh-server.templates:1001
24msgid "Disable SSH password authentication for root?"
25msgstr "Inaktivera SSH-lösenordsautentisering för root?"
26
27#. Type: boolean
28#. Description
29#: ../openssh-server.templates:1001
30msgid ""
31"Previous versions of openssh-server permitted logging in as root over SSH "
32"using password authentication. The default for new installations is now "
33"\"PermitRootLogin prohibit-password\", which disables password "
34"authentication for root without breaking systems that have explicitly "
35"configured SSH public key authentication for root."
36msgstr ""
37"Tidigare versioner av openssh-server tillät inloggning som root över SSH med "
38"hjälp av lösenordsautentisering. Standardinställningen för nya "
39"installationer är nu \"PermitRootLogin prohibit-password\", vilket "
40"inaktiverar lösenordsautentisering för root utan att förstöra system som "
41"explicit har konfigurerat nyckelautentisering med hjälp av publika nycklar "
42"för root."
43
44#. Type: boolean
45#. Description
46#: ../openssh-server.templates:1001
47msgid ""
48"This change makes systems more secure against brute-force password "
49"dictionary attacks on the root user (a very common target for such attacks). "
50"However, it may break systems that are set up with the expectation of being "
51"able to SSH as root using password authentication. You should only make this "
52"change if you do not need to do that."
53msgstr ""
54"Denna förändring gör system säkrare mot brute-force-angrepp med hjälp av "
55"ordlistor med lösenord på root-användaren (ett väldigt vanligt mål för "
56"sådana angrepp). Dock så kan detta förstöra system som förväntas kunna "
57"använda SSH som root med hjälp av lösenordsautentisering. Du skall endast "
58"göra denna förändring om du inte har ett behov av att kunna göra detta."
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 000000000..47c9e3686
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,46 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: openssh\n"
10"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
11"POT-Creation-Date: 2014-03-20 02:06+0000\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"Language: \n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#. Type: boolean
21#. Description
22#: ../openssh-server.templates:1001
23msgid "Disable SSH password authentication for root?"
24msgstr ""
25
26#. Type: boolean
27#. Description
28#: ../openssh-server.templates:1001
29msgid ""
30"Previous versions of openssh-server permitted logging in as root over SSH "
31"using password authentication. The default for new installations is now "
32"\"PermitRootLogin prohibit-password\", which disables password "
33"authentication for root without breaking systems that have explicitly "
34"configured SSH public key authentication for root."
35msgstr ""
36
37#. Type: boolean
38#. Description
39#: ../openssh-server.templates:1001
40msgid ""
41"This change makes systems more secure against brute-force password "
42"dictionary attacks on the root user (a very common target for such attacks). "
43"However, it may break systems that are set up with the expectation of being "
44"able to SSH as root using password authentication. You should only make this "
45"change if you do not need to do that."
46msgstr ""
diff --git a/debian/po/tr.po b/debian/po/tr.po
new file mode 100644
index 000000000..1ada04101
--- /dev/null
+++ b/debian/po/tr.po
@@ -0,0 +1,58 @@
1# Turkish translation of openssh package
2# Copyright (C) 2014 Mert Dirik
3# This file is distributed under the same license as the openssh package.
4# Mert Dirik <mertdirik@gmail.com>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openssh-server\n"
9"Report-Msgid-Bugs-To: openssh@packages.debian.org\n"
10"POT-Creation-Date: 2014-03-20 02:06+0000\n"
11"PO-Revision-Date: 2014-08-01 14:44+0200\n"
12"Last-Translator: Mert Dirik <mertdirik@gmail.com>\n"
13"Language-Team: Debian L10n Turkish <debian-l10n-turkish@lists.debian.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Generator: Poedit 1.5.4\n"
18"Language: tr\n"
19
20#. Type: boolean
21#. Description
22#: ../openssh-server.templates:1001
23msgid "Disable SSH password authentication for root?"
24msgstr "root kullanıcısının parola ile kimlik doğrulaması engellensin mi?"
25
26#. Type: boolean
27#. Description
28#: ../openssh-server.templates:1001
29msgid ""
30"Previous versions of openssh-server permitted logging in as root over SSH "
31"using password authentication. The default for new installations is now "
32"\"PermitRootLogin prohibit-password\", which disables password "
33"authentication for root without breaking systems that have explicitly "
34"configured SSH public key authentication for root."
35msgstr ""
36"openssh-server'ın önceki sürümleri parola ile kimlik doğrulama kullanılarak "
37"root kullanıcısının SSH üzerinden oturum açmasına izin veriyordu. Artık yeni "
38"kurulumların öntanımlı ayarı \"PermitRootLogin prohibit-password\" "
39"şeklindedir. Bu ayar root kullanıcısının parola kullanarak oturum açmasını "
40"yasaklar. SSH genel anahtar doğrulama yöntemine ayrıca izin veren mevcut "
41"sistemler bu ayardan etkilenmez."
42
43#. Type: boolean
44#. Description
45#: ../openssh-server.templates:1001
46msgid ""
47"This change makes systems more secure against brute-force password "
48"dictionary attacks on the root user (a very common target for such attacks). "
49"However, it may break systems that are set up with the expectation of being "
50"able to SSH as root using password authentication. You should only make this "
51"change if you do not need to do that."
52msgstr ""
53"Bu ayar sistemleri kaba kuvvet sözlükten parola saldırılarına karşı güvenli "
54"hale getirir (root kullanıcısı bu tarz saldırıların en büyük "
55"hedeflerindendir). Fakat bu ayarın etkinleştirilmesi, root kullanıcısına "
56"parola doğrulama yöntemiyle oturum açılabileceği varsayımıyla hareket eden "
57"sistemlerde eskiden çalışan düzenin bozulmasına sebep olacaktır. Bu "
58"değişikliği yalnızca sorun çıkarmayacağından eminseniz yapın."
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000000000..225655612
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,246 @@
1#!/usr/bin/make -f
2
3# Uncomment this to turn on verbose mode.
4# export DH_VERBOSE=1
5
6# This has to be exported to make some magic below work.
7export DH_OPTIONS
8
9ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
10 RUN_TESTS := yes
11else
12 RUN_TESTS :=
13endif
14
15ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
16 PARALLEL :=
17else
18 PARALLEL := \
19 -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
20endif
21
22DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
23DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
24DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
25
26ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
27 CC := gcc
28 PKG_CONFIG = pkg-config
29else
30 CC := $(DEB_HOST_GNU_TYPE)-gcc
31 PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config
32 RUN_TESTS :=
33endif
34
35DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
36
37# Take account of old dpkg-architecture output.
38ifeq ($(DEB_HOST_ARCH_OS),)
39 DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM))
40 ifeq ($(DEB_HOST_ARCH_OS),gnu)
41 DEB_HOST_ARCH_OS := hurd
42 endif
43endif
44
45# Change the version string to reflect distribution
46DISTRIBUTION := $(shell dpkg-vendor --query vendor)
47SSH_EXTRAVERSION := $(DISTRIBUTION)-$(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p' | sed -e 's/[^-]*-//')
48
49DISTRIBUTOR := $(shell if dpkg-vendor --derives-from Ubuntu 2>/dev/null; then echo Ubuntu; else echo Debian; fi)
50ifeq ($(DISTRIBUTOR),Ubuntu)
51DEFAULT_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
52else
53DEFAULT_PATH := /usr/local/bin:/usr/bin:/bin:/usr/games
54endif
55SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
56
57ifeq ($(DISTRIBUTOR),Ubuntu)
58server_recommends := ssh-import-id
59else
60server_recommends :=
61endif
62
63# Common path configuration.
64confflags += --sysconfdir=/etc/ssh
65confflags += --libexecdir=\$${prefix}/lib/openssh
66
67# Common build options.
68confflags += --disable-strip
69confflags += --with-mantype=doc
70confflags += --with-4in6
71confflags += --with-privsep-path=/run/sshd
72confflags += --with-pid-dir=/run
73
74# The Hurd needs libcrypt for res_query et al.
75ifeq ($(DEB_HOST_ARCH_OS),hurd)
76confflags += --with-libs=-lcrypt
77endif
78
79# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
80ifeq ($(DEB_HOST_ARCH),hppa)
81confflags += --without-hardening
82endif
83
84# Everything above here is common to the deb and udeb builds.
85confflags_udeb := $(confflags)
86
87# Options specific to the deb build.
88confflags += --with-tcp-wrappers
89confflags += --with-pam
90confflags += --with-libedit
91confflags += --with-kerberos5=/usr
92confflags += --with-ssl-engine
93ifeq ($(DEB_HOST_ARCH_OS),linux)
94confflags += --with-selinux
95confflags += --with-audit=linux
96confflags += --with-systemd
97endif
98
99# The deb build wants xauth; the udeb build doesn't.
100confflags += --with-xauth=/usr/bin/xauth
101confflags_udeb += --without-xauth
102
103# Default paths. The udeb build has /usr/games removed.
104confflags += --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH)
105confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
106
107# Compiler flags.
108export DEB_BUILD_MAINT_OPTIONS := hardening=+all
109include /usr/share/dpkg/buildflags.mk
110cflags := $(CPPFLAGS) $(CFLAGS)
111cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
112cflags_udeb := -Os
113cflags_udeb += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\"
114confflags += --with-cflags='$(cflags)'
115confflags_udeb += --with-cflags='$(cflags_udeb)'
116
117# Linker flags.
118confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))'
119confflags_udeb += --with-ldflags='-Wl,--as-needed'
120
121%:
122 dh $@ --with=autoreconf,systemd
123
124autoreconf:
125 autoreconf -f -i
126 cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./
127
128override_dh_autoreconf-arch:
129 dh_autoreconf debian/rules -- autoreconf
130
131override_dh_autoreconf-indep:
132
133override_dh_auto_configure-arch:
134 dh_auto_configure -Bdebian/build-deb -- $(confflags)
135ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
136 dh_auto_configure -Bdebian/build-udeb -- $(confflags_udeb)
137 # Avoid libnsl linkage. Ugh.
138 perl -pi -e 's/ +-lnsl//' debian/build-udeb/config.status
139 cd debian/build-udeb && ./config.status
140endif
141
142override_dh_auto_configure-indep:
143
144override_dh_auto_build-arch:
145 $(MAKE) -C debian/build-deb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass'
146ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
147 $(MAKE) -C debian/build-udeb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen
148endif
149
150ifeq ($(filter pkg.openssh.nognome,$(DEB_BUILD_PROFILES)),)
151 $(MAKE) -C contrib gnome-ssh-askpass3 CC='$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -Wl,--as-needed $(LDFLAGS)' PKG_CONFIG=$(PKG_CONFIG)
152endif
153
154override_dh_auto_build-indep:
155
156override_dh_auto_test-arch:
157ifeq ($(RUN_TESTS),yes)
158 $(MAKE) -C debian/build-deb regress-prep
159 $(MAKE) -C debian/build-deb $(PARALLEL) regress-binaries
160 $(MAKE) -C debian/build-deb/regress \
161 .OBJDIR="$(CURDIR)/debian/build-deb/regress" \
162 .CURDIR="$(CURDIR)/regress" \
163 unit
164 $(MAKE) -C debian/build-deb compat-tests
165 $(MAKE) -C debian/keygen-test
166endif
167
168override_dh_auto_test-indep:
169
170override_dh_auto_clean:
171 rm -rf debian/build-deb debian/build-udeb
172ifeq ($(RUN_TESTS),yes)
173 $(MAKE) -C debian/keygen-test clean
174endif
175 $(MAKE) -C contrib clean
176
177override_dh_auto_install-arch:
178 $(MAKE) -C debian/build-deb DESTDIR=`pwd`/debian/tmp install-nokeys
179
180override_dh_auto_install-indep:
181
182override_dh_install-arch:
183 rm -f debian/tmp/etc/ssh/sshd_config
184
185 dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb --fail-missing
186ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
187 dh_install -popenssh-client-udeb -popenssh-server-udeb \
188 --sourcedir=debian/build-udeb
189endif
190
191 # Remove version control tags to avoid unnecessary conffile
192 # resolution steps for administrators.
193 sed -i '/\$$OpenBSD:/d' \
194 debian/openssh-client/etc/ssh/moduli \
195 debian/openssh-client/etc/ssh/ssh_config
196
197# We'd like to use dh_install --fail-missing here, but that doesn't work
198# well in combination with dh-exec: it complains that files generated by
199# dh-exec for architecture-dependent packages aren't installed.
200override_dh_install-indep:
201 rm -f debian/tmp/etc/ssh/sshd_config
202 dh_install
203
204override_dh_installdocs:
205 dh_installdocs -Nopenssh-server -Nopenssh-sftp-server
206 dh_installdocs -popenssh-server -popenssh-sftp-server \
207 --link-doc=openssh-client
208 # Avoid breaking dh_installexamples later.
209 mkdir -p debian/openssh-server/usr/share/doc/openssh-client
210
211override_dh_systemd_enable:
212 dh_systemd_enable -popenssh-server --name ssh ssh.service
213 dh_systemd_enable -popenssh-server --name ssh --no-enable ssh.socket
214
215override_dh_installinit:
216 dh_installinit -R --name ssh
217
218debian/openssh-server.sshd.pam: debian/openssh-server.sshd.pam.in
219ifeq ($(DEB_HOST_ARCH_OS),linux)
220 sed 's/^@IF_KEYINIT@//' $< > $@
221else
222 sed '/^@IF_KEYINIT@/d' $< > $@
223endif
224
225override_dh_installpam: debian/openssh-server.sshd.pam
226 dh_installpam --name sshd
227
228override_dh_fixperms-arch:
229 dh_fixperms
230 chmod u+s debian/openssh-client/usr/lib/openssh/ssh-keysign
231
232# Tighten libssl dependencies to match the check in entropy.c.
233override_dh_shlibdeps:
234 dh_shlibdeps
235 debian/adjust-openssl-dependencies
236
237override_dh_gencontrol:
238 dh_gencontrol -- -V'openssh-server:Recommends=$(server_recommends)'
239
240override_dh_builddeb:
241 dh_builddeb -- -Zxz
242
243debian/faq.html:
244 wget -O - http://www.openssh.com/faq.html | \
245 sed 's,\(href="\)\(txt/\|[^":]*\.html\),\1http://www.openssh.com/\2,g' \
246 > debian/faq.html
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 000000000..163aaf8d8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
3.0 (quilt)
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 000000000..df5790e2e
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1 @@
debian/ssh-askpass-gnome.png
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 000000000..1a0c77d41
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,2 @@
1# openssh-server/password-authentication is preseeding-only, at least for now.
2openssh source: untranslatable-debconf-templates openssh-server.templates: 20
diff --git a/debian/ssh-argv0 b/debian/ssh-argv0
new file mode 100644
index 000000000..37506a4d7
--- /dev/null
+++ b/debian/ssh-argv0
@@ -0,0 +1,31 @@
1#! /bin/sh
2set -e
3
4# Copyright (c) 2001 Jonathan Amery.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14#
15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
26if [ "${0##*/}" = "ssh-argv0" ]
27then
28 echo 'ssh-argv0: This script should not be run like this, see ssh-argv0(1) for details' 1>&2
29 exit 1
30fi
31exec ssh "${0##*/}" "$@"
diff --git a/debian/ssh-argv0.1 b/debian/ssh-argv0.1
new file mode 100644
index 000000000..a36a63d40
--- /dev/null
+++ b/debian/ssh-argv0.1
@@ -0,0 +1,64 @@
1.Dd September 7, 2001
2.Dt SSH-ARGV0 1
3.Os Debian Project
4.Sh NAME
5.Nm ssh-argv0
6.Nd replaces the old ssh command-name as hostname handling
7.Sh SYNOPSIS
8.Ar hostname | user@hostname
9.Op Fl l Ar login_name
10.Op Ar command
11.Pp
12.Ar hostname | user@hostname
13.Op Fl afgknqstvxACNTX1246
14.Op Fl b Ar bind_address
15.Op Fl c Ar cipher_spec
16.Op Fl e Ar escape_char
17.Op Fl i Ar identity_file
18.Op Fl l Ar login_name
19.Op Fl m Ar mac_spec
20.Op Fl o Ar option
21.Op Fl p Ar port
22.Op Fl F Ar configfile
23.Oo Fl L Xo
24.Sm off
25.Ar port :
26.Ar host :
27.Ar hostport
28.Sm on
29.Xc
30.Oc
31.Oo Fl R Xo
32.Sm off
33.Ar port :
34.Ar host :
35.Ar hostport
36.Sm on
37.Xc
38.Oc
39.Op Fl D Ar port
40.Op Ar command
41.Sh DESCRIPTION
42.Nm
43replaces the old ssh command-name as hostname handling.
44If you link to this script with a hostname then executing the link is
45equivalent to having executed ssh with that hostname as an argument.
46All other arguments are passed to ssh and will be processed normally.
47.Sh OPTIONS
48See
49.Xr ssh 1 .
50.Sh FILES
51See
52.Xr ssh 1 .
53.Sh AUTHORS
54OpenSSH is a derivative of the original and free
55ssh 1.2.12 release by Tatu Ylonen.
56Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
57Theo de Raadt and Dug Song
58removed many bugs, re-added newer features and
59created OpenSSH.
60Markus Friedl contributed the support for SSH
61protocol versions 1.5 and 2.0.
62Jonathan Amery wrote this ssh-argv0 script and the associated documentation.
63.Sh SEE ALSO
64.Xr ssh 1
diff --git a/debian/ssh-askpass-gnome.desktop b/debian/ssh-askpass-gnome.desktop
new file mode 100644
index 000000000..eba7a67d1
--- /dev/null
+++ b/debian/ssh-askpass-gnome.desktop
@@ -0,0 +1,12 @@
1[Desktop Entry]
2Version=1.0
3Encoding=UTF-8
4Name=SSH AskPass
5GenericName=ssh-add
6Comment=Enter passphrase to authenticate to the ssh agent
7Exec=/usr/bin/ssh-add
8TryExec=ssh-add
9Terminal=false
10Type=Application
11Icon=ssh-askpass-gnome
12Categories=Network;Security;
diff --git a/debian/ssh-askpass-gnome.examples b/debian/ssh-askpass-gnome.examples
new file mode 100644
index 000000000..66fd8c0e4
--- /dev/null
+++ b/debian/ssh-askpass-gnome.examples
@@ -0,0 +1 @@
debian/ssh-askpass-gnome.desktop
diff --git a/debian/ssh-askpass-gnome.install b/debian/ssh-askpass-gnome.install
new file mode 100755
index 000000000..8715aafaf
--- /dev/null
+++ b/debian/ssh-askpass-gnome.install
@@ -0,0 +1,3 @@
1#! /usr/bin/dh-exec
2contrib/gnome-ssh-askpass3 => usr/lib/openssh/gnome-ssh-askpass
3debian/ssh-askpass-gnome.png usr/share/pixmaps
diff --git a/debian/ssh-askpass-gnome.manpages b/debian/ssh-askpass-gnome.manpages
new file mode 100644
index 000000000..7749f13bb
--- /dev/null
+++ b/debian/ssh-askpass-gnome.manpages
@@ -0,0 +1 @@
debian/gnome-ssh-askpass.1
diff --git a/debian/ssh-askpass-gnome.png b/debian/ssh-askpass-gnome.png
new file mode 100644
index 000000000..06f75764e
--- /dev/null
+++ b/debian/ssh-askpass-gnome.png
Binary files differ
diff --git a/debian/ssh-askpass-gnome.postinst b/debian/ssh-askpass-gnome.postinst
new file mode 100644
index 000000000..8a454e520
--- /dev/null
+++ b/debian/ssh-askpass-gnome.postinst
@@ -0,0 +1,48 @@
1#! /bin/sh
2# postinst script for ssh-askpass-gnome
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <postinst> `configure' <most-recently-configured-version>
10# * <old-postinst> `abort-upgrade' <new version>
11# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12# <new-version>
13# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14# <failed-install-package> <version> `removing'
15# <conflicting-package> <version>
16# for details, see /usr/share/doc/packaging-manual/
17#
18# quoting from the policy:
19# Any necessary prompting should almost always be confined to the
20# post-installation script, and should be protected with a conditional
21# so that unnecessary prompting doesn't happen if a package's
22# installation fails and the `postinst' is called with `abort-upgrade',
23# `abort-remove' or `abort-deconfigure'.
24
25case "$1" in
26 configure)
27 update-alternatives --quiet \
28 --install /usr/bin/ssh-askpass ssh-askpass \
29 /usr/lib/openssh/gnome-ssh-askpass 30 \
30 --slave /usr/share/man/man1/ssh-askpass.1.gz \
31 ssh-askpass.1.gz /usr/share/man/man1/gnome-ssh-askpass.1.gz
32 ;;
33
34 abort-upgrade|abort-remove|abort-deconfigure)
35 ;;
36
37 *)
38 echo "postinst called with unknown argument \`$1'" >&2
39 exit 0
40 ;;
41esac
42
43# dh_installdeb will replace this with shell code automatically
44# generated by other debhelper scripts.
45
46#DEBHELPER#
47
48exit 0
diff --git a/debian/ssh-askpass-gnome.prerm b/debian/ssh-askpass-gnome.prerm
new file mode 100644
index 000000000..0adcfc76b
--- /dev/null
+++ b/debian/ssh-askpass-gnome.prerm
@@ -0,0 +1,39 @@
1#! /bin/sh
2# prerm script for ssh-askpass-gnome
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <prerm> `remove'
10# * <old-prerm> `upgrade' <new-version>
11# * <new-prerm> `failed-upgrade' <old-version>
12# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
13# * <deconfigured's-prerm> `deconfigure' `in-favour'
14# <package-being-installed> <version> `removing'
15# <conflicting-package> <version>
16# for details, see /usr/share/doc/packaging-manual/
17
18case "$1" in
19 remove|deconfigure)
20 update-alternatives --quiet --remove ssh-askpass /usr/lib/openssh/gnome-ssh-askpass
21 ;;
22 upgrade)
23 ;;
24 failed-upgrade)
25 ;;
26 *)
27 echo "prerm called with unknown argument \`$1'" >&2
28 exit 0
29 ;;
30esac
31
32# dh_installdeb will replace this with shell code automatically
33# generated by other debhelper scripts.
34
35#DEBHELPER#
36
37exit 0
38
39
diff --git a/debian/ssh.lintian-overrides b/debian/ssh.lintian-overrides
new file mode 100644
index 000000000..b9bf7ea08
--- /dev/null
+++ b/debian/ssh.lintian-overrides
@@ -0,0 +1 @@
ssh: package-contains-empty-directory usr/share/doc/openssh-client/
diff --git a/debian/ssh.maintscript b/debian/ssh.maintscript
new file mode 100644
index 000000000..efd370e25
--- /dev/null
+++ b/debian/ssh.maintscript
@@ -0,0 +1 @@
symlink_to_dir /usr/share/doc/ssh /usr/share/doc/openssh-client 1:6.6p1-8~
diff --git a/debian/systemd/ssh-agent.override b/debian/systemd/ssh-agent.override
new file mode 100644
index 000000000..2905494b6
--- /dev/null
+++ b/debian/systemd/ssh-agent.override
@@ -0,0 +1 @@
manual
diff --git a/debian/systemd/ssh-agent.service b/debian/systemd/ssh-agent.service
new file mode 100644
index 000000000..07fa984c0
--- /dev/null
+++ b/debian/systemd/ssh-agent.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=OpenSSH Agent
3Before=graphical-session-pre.target
4ConditionPathExists=/etc/X11/Xsession.options
5Wants=dbus.socket
6After=dbus.socket
7
8[Service]
9ExecStart=/usr/lib/openssh/agent-launch start
10ExecStopPost=/usr/lib/openssh/agent-launch stop
diff --git a/debian/systemd/ssh-session-cleanup b/debian/systemd/ssh-session-cleanup
new file mode 100755
index 000000000..f283cc967
--- /dev/null
+++ b/debian/systemd/ssh-session-cleanup
@@ -0,0 +1,11 @@
1#! /bin/sh
2
3ssh_session_pattern='sshd: \S.*@pts/[0-9]+'
4
5IFS="$IFS@"
6pgrep -a -f "$ssh_session_pattern" | while read pid daemon user pty; do
7 echo "Found ${daemon%:} session $pid on $pty; sending SIGTERM"
8 kill "$pid" || true
9done
10
11exit 0
diff --git a/debian/systemd/ssh-session-cleanup.service b/debian/systemd/ssh-session-cleanup.service
new file mode 100644
index 000000000..b86727227
--- /dev/null
+++ b/debian/systemd/ssh-session-cleanup.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=OpenBSD Secure Shell session cleanup
3Wants=network.target
4After=network.target
5
6[Service]
7ExecStart=/bin/true
8ExecStop=/usr/lib/openssh/ssh-session-cleanup
9RemainAfterExit=yes
10Type=oneshot
11
12[Install]
13WantedBy=multi-user.target
diff --git a/debian/systemd/ssh.service b/debian/systemd/ssh.service
new file mode 100644
index 000000000..3b10e7957
--- /dev/null
+++ b/debian/systemd/ssh.service
@@ -0,0 +1,21 @@
1[Unit]
2Description=OpenBSD Secure Shell server
3After=network.target auditd.service
4ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
5
6[Service]
7EnvironmentFile=-/etc/default/ssh
8ExecStartPre=/usr/sbin/sshd -t
9ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
10ExecReload=/usr/sbin/sshd -t
11ExecReload=/bin/kill -HUP $MAINPID
12KillMode=process
13Restart=on-failure
14RestartPreventExitStatus=255
15Type=notify
16RuntimeDirectory=sshd
17RuntimeDirectoryMode=0755
18
19[Install]
20WantedBy=multi-user.target
21Alias=sshd.service
diff --git a/debian/systemd/ssh.socket b/debian/systemd/ssh.socket
new file mode 100644
index 000000000..5a766dcab
--- /dev/null
+++ b/debian/systemd/ssh.socket
@@ -0,0 +1,12 @@
1[Unit]
2Description=OpenBSD Secure Shell server socket
3Before=ssh.service
4Conflicts=ssh.service
5ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
6
7[Socket]
8ListenStream=22
9Accept=yes
10
11[Install]
12WantedBy=sockets.target
diff --git a/debian/systemd/ssh@.service b/debian/systemd/ssh@.service
new file mode 100644
index 000000000..65fddf2a5
--- /dev/null
+++ b/debian/systemd/ssh@.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=OpenBSD Secure Shell server per-connection daemon
3After=auditd.service
4
5[Service]
6EnvironmentFile=-/etc/default/ssh
7ExecStart=-/usr/sbin/sshd -i $SSHD_OPTS
8StandardInput=socket
9RuntimeDirectory=sshd
10RuntimeDirectoryMode=0755
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000000000..ba59c97b4
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,13 @@
1Tests: regress
2Restrictions: needs-root allow-stderr
3Depends: devscripts,
4 haveged,
5 openssh-client,
6 openssh-server,
7 openssh-sftp-server,
8 openssl,
9 putty-tools (>= 0.67-2),
10 python-twisted-conch (>= 1:15.5.0-1),
11 sudo,
12 sysvinit-utils,
13 @builddeps@,
diff --git a/debian/tests/regress b/debian/tests/regress
new file mode 100755
index 000000000..e89e1940a
--- /dev/null
+++ b/debian/tests/regress
@@ -0,0 +1,97 @@
1#! /bin/sh
2set -ex
3
4if [ "$(id -un)" != openssh-tests ]; then
5 TMP="$ADTTMP/user"
6 STARTED_HAVEGED=false
7
8 cleanup () {
9 if $STARTED_HAVEGED; then
10 if [ -d /run/systemd/system ] && \
11 which systemctl >/dev/null 2>&1; then
12 systemctl disable haveged || true
13 systemctl stop haveged || true
14 else
15 start-stop-daemon --stop --quiet \
16 --retry=TERM/30/KILL/5 \
17 --pidfile "$TMP/haveged.pid" \
18 --name haveged
19 fi
20 fi
21 rm -rf "$TMP"
22 rm -f /etc/sudoers.d/openssh-tests
23 if id openssh-tests >/dev/null 2>&1; then
24 deluser --remove-home openssh-tests
25 fi
26 }
27 trap cleanup EXIT
28
29 adduser --disabled-password --gecos 'OpenSSH tests' openssh-tests
30 cat >/etc/sudoers.d/openssh-tests <<EOF
31openssh-tests ALL = (ALL:ALL) NOPASSWD: ALL
32EOF
33 chmod 440 /etc/sudoers.d/openssh-tests
34 mkdir -p "$TMP"
35 cp -a . "$TMP/tree"
36 chown -R openssh-tests:openssh-tests "$TMP"
37
38 # If we're running in a container, haveged may not have started
39 # automatically.
40 if [ -d /run/systemd/system ] && which systemctl >/dev/null 2>&1; then
41 systemctl enable haveged || true
42 systemctl start haveged || true
43 STARTED_HAVEGED=:
44 elif ! pidof haveged >/dev/null; then
45 start-stop-daemon --start --quiet \
46 --pidfile "$TMP/haveged.pid" \
47 --exec /usr/sbin/haveged -- -p "$TMP/haveged.pid"
48 STARTED_HAVEGED=:
49 fi
50
51 sudo -u openssh-tests env TMP="$TMP" "$0" "$@"
52 exit "$?"
53fi
54
55# Don't use "make tests"; we want to test the installed version.
56
57cd "$TMP/tree"
58
59# We aren't actually going to use most of this build, but we need a basic
60# build tree in place in order to be able to build the regression tests.
61autoreconf -f -i
62cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./
63./configure
64make
65
66# The defaults for TEST_SSH_* in regress/test-exec.sh use the system
67# versions, but the top-level Makefile sets things up to test the just-built
68# versions, so we must bypass the latter in order to work correctly under
69# autopkgtest.
70make regress-prep
71make regress-binaries
72
73SRCDIR="$(pwd)"
74BUILDDIR="$SRCDIR"
75ret=0
76annotate-output +%H:%M:%S.%N make -C regress \
77 .OBJDIR="$BUILDDIR/regress" \
78 .CURDIR="$SRCDIR/regress" \
79 BUILDDIR="$BUILDDIR" \
80 OBJ="$BUILDDIR/regress" \
81 SUDO=sudo \
82 TEST_SHELL='sh -x' \
83 TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \
84 TEST_SSH_PLINK=plink \
85 TEST_SSH_PUTTYGEN=puttygen \
86 TEST_SSH_CONCH=conch \
87 TEST_SSH_IPV6=yes \
88 TEST_SSH_ECC=yes \
89 tests interop-tests </dev/zero || ret="$?"
90if [ "$ret" -ne 0 ]; then
91 for log in failed-regress.log failed-ssh.log failed-sshd.log; do
92 if [ -e "$BUILDDIR/regress/$log" ]; then
93 tail -v -n+0 "$BUILDDIR/regress/$log"
94 fi
95 done
96fi
97exit "$ret"
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
new file mode 100644
index 000000000..ac41e6e22
--- /dev/null
+++ b/debian/upstream/signing-key.asc
@@ -0,0 +1,44 @@
1-----BEGIN PGP PUBLIC KEY BLOCK-----
2Version: GnuPG v1
3
4mQGdBFKmggUBDICUNqm4cNh7tdEbwaNhbnwqLiHpILeXT6sddGI0Stz5ofB1uvIH
5m9kXYG5XUUwlc5ywjIZm2JeuKqrd/6wAz5laLagFA6k86EZzzuBE3b5FxSQ4EN4K
65XZEJo61xASEF7z1mQCiqoA6/F407ht7nNoiVE95kOmqJlv4cqbpCw3n8f2VW+mV
7UH6MYRZVrYAC9NnJWv24rem2fjgFhNT1/bx44G7H9bVJqL7hMEGa+xYQBI3YT/ul
8Eu9HYmLFVeiZm1gB1eKXW7jS4ctLl5uPrxayA5DX/qNB2yqgVVlIKFwUm8gGPGPO
9nsNKo0xBseE7E0F/KeGpaT5aS9yFgPm9A652Jx9felYgb0e9Ipt3lxriPQwgF/cx
10LGuP/WEbN5fpWFnuV0ViklusuVI2e8GHJGU5bQD5AlzvWu4Sv6oBOcDCabScydY7
11IxPBk/XBWCF9QDIa2qa32Mc9dYc8EnJszPeVCHX5hG23omDRmdLGLwH7F+CuBvCx
12AKCymZtJl5DhRmnhdzRg9d+0VG4hLF7O06ANABEBAAG0H0RhbWllbiBNaWxsZXIg
13PGRqbUBtaW5kcm90Lm9yZz6JAc0EEwECACcCGwMFCQ1H67ECHgECF4AFAlKmjJwE
14CwkIBwYVCgkICwIFFgIDAQAACgkQ0+X1a22SDTB2TAx9E1ozPJKUGWJPZefqsSr8
15KsO6Dp3QuPrw2Zwgo2QfeCT+uzNA5AKCDIAaYEpVbQsvu4sDy8dAW1+HENCxVrMX
16WG+SH41lcdAdI4io0PGHVQDl42R5jX3e9pfjYCQALVv5BDXddK6054nyxEmudQ3I
17CFCYXIcqQbA1nfj3Uk06jGhuM99B2/akbxCoFSiUX9uHDZKNYAGpU7/FCF9xCZF4
18Kd9Twvyy17jDIg7km3/Q4Jy++VP8FyvE5JjBdLRQSBzSG9GCjv9fyKWW7S0bMY4D
193SKKt/Jm1XchEMgpRr4eBpgCs3rxO1hXjzqm3te97uy6/q8CuJUtupJsPKc9Wh4+
20ogUZifC0ta7UrxZp8yZTRvPSUxYrlvDzM32VDLQ3FX6Y2i4VNo48PSJMA+BPUx7D
21TcZKIXt457zsLD4jF4sRdwOk/QF/GXCkH2GAyKHWCPXIOe+jIXgiuajcqZm9cAWj
22L3hidSohKfefvKkzsg75mDmjhvAtDncIbmImJNjXIe2PQU4iY9Vq5i0vlaVKgBgK
23SohGBBARAgAGBQJSpovfAAoJEM6OywOG/5xInf8An0A7MPrfJIz2e643VEV4AX3d
24O9+IAJ9MOsQiB4LnqtTcc9NBMHf9VLE46LkBnQRSpoIFAQyA1OdwfpwXKch+O00W
251FsQSMcEjahGmo84WTroM/qjTd7Ysld300PMv3wkQn2WdhyTca/EmkW0fVTGSYs7
26Z3v5SpPf0prYSjmfu8WlXoz64ApdXqGHjj9KAeq2OuUtWrwobgiQEzU4Hxlz94X/
2765BgG5k7OTyE3J6bgRcMwJCgCkwjK85wbbBkGH+Jo9o/Zw9TPczQcE7BmGYkkLNA
28Xbw7omKBOL4Z6w9sXToz9UnQ0EB9s4TvAbHGKX9y2PEQjZN+wkzR3DavWB7ql8vH
29ZIRmspAsDAJvDT1ofsNtu8MB8wJcxvZaoZ7j9wULYpnaNYx9xxEhgbB9o1mBcYsd
30Dj3xz5jrgtq/cpdgGC6bg+awDc/ylQ1mNglKfY8P9hFIhIANZilnmAlk5GSoWclP
31/69m+u34KKoHU4Yc3I1pPNcL6Nyi0bh8mHqe9WedKfod7Y4yM1S20fXaS4vrLIlK
32gxbsDpWiWrk0ltV03uyC7eqDe3nzzGW/2GLTHj5xsA2+HwGtPom5mmzjvV5PFNpS
337a90JQARAQABiQG1BBgBAgAPBQJSpoIFAhsMBQkNR+uxAAoJENPl9Wttkg0wEScM
34f2QjDWm3XawJxNA8pqqxrFeTEo+GESznVRTUeprrUFd1GHw33qaAvqLixZ+x8cr+
351Gj/fJd5eiIVJfRLYbXlC8su8JZXngfX0VhuMcUob/FTikfpcoYkRzriUsJEB3/O
36mjlLjGgnQm5Gz9TV1ityF3bzoHkR8svWEKKKzNoIEPHLU3y7bqSkOrjnY3bZfdVR
37h618XbjV28NMuoZsV8E4pOuQoy+3s5IjmIf/mkSiFE3VJwdaPem23UsXatFb/eoC
38/Ahi0iCd/8ioFwi+oHT2Pnt9HrzVF6E8gBVO3vKo6UJgDTr9Qt27Nc6eHL0O5j50
39ins9ob/3DoOC3P5A08zhl+w466yGEv5+Es/usUAs/4ng4ksI3DTLK9Ygj70l5oBu
40MFYd3b5KGVfAIlGc5mwIOIG41YLIzZTrGuOuTymjwCdC9cUZJ6R2Cv/Vx0htZ0hq
41DdyaDO0Io9OG/W2s2T7160tY9ic4MwBCFemzwFELIBIIHNY/n/wsmxQGkI3Oj86J
42pOVVgR5lXWR+BrGcBjkSEyg=
43=T9xO
44-----END PGP PUBLIC KEY BLOCK-----
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 000000000..e05063598
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
1version=3
2opts=pgpsigurlmangle=s/$/.asc/ \
3http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-(.*)\.tar\.gz