Commit Graph

373 Commits

Author SHA1 Message Date
naddy@openbsd.org 3e806d0118
upstream: separate keywords with comma
OpenBSD-Commit-ID: d65a99666202a8188c4991c18d14374a229f7be5
2024-06-14 10:27:33 +10:00
djm@openbsd.org 4de80ff4e6
upstream: split PerSourcePenalties address tracking. Previously it
used one shared table and overflow policy for IPv4 and IPv6 addresses, now it
will use separate tables and optionally different overflow policies.

This prevents misbehaviour from IPv6 addresses (which are vastly easier
to obtain many of) from affecting IPv4 connections and may allow for
stricter overflow policies.

ok deraadt@

OpenBSD-Commit-ID: 12637ed0aa4d5f1f3e702da42ea967cbd8bfdfd9
2024-06-13 08:36:41 +10:00
jmc@openbsd.org 06ab4c6931
upstream: do not mark up "(default: 20ms)";
OpenBSD-Commit-ID: 54151ecdecfa1b67dcdda4fd24826ef6e2148ad4
2024-06-13 08:36:40 +10:00
djm@openbsd.org a2300f015c
upstream: update to mention that PerSourcePenalties default to
being enabled and document the default values for each parameter.

OpenBSD-Commit-ID: b981288bddfb097aad269f62df4081c688ce0034
2024-06-11 11:26:51 +10:00
jmc@openbsd.org 3ad4cd9eec
upstream: escape the final dot at eol in "e.g." to avoid double
spacing;

OpenBSD-Commit-ID: 0a9fb10bc9f7d577afe2da3f498a08bc431115b9
2024-06-11 11:26:49 +10:00
djm@openbsd.org bd1f74741d
upstream: mention that PerSourcePenalties don't affect concurrent
in-progress connections.

OpenBSD-Commit-ID: 20389da6264f2c97ac3463edfaa1182c212d420c
2024-06-07 06:26:15 +10:00
djm@openbsd.org 81c1099d22
upstream: Add a facility to sshd(8) to penalise particular
problematic client behaviours, controlled by two new sshd_config(5) options:
PerSourcePenalties and PerSourcePenaltyExemptList.

When PerSourcePenalties are enabled, sshd(8) will monitor the exit
status of its child pre-auth session processes. Through the exit
status, it can observe situations where the session did not
authenticate as expected. These conditions include when the client
repeatedly attempted authentication unsucessfully (possibly indicating
an attack against one or more accounts, e.g. password guessing), or
when client behaviour caused sshd to crash (possibly indicating
attempts to exploit sshd).

When such a condition is observed, sshd will record a penalty of some
duration (e.g. 30 seconds) against the client's address. If this time
is above a minimum threshold specified by the PerSourcePenalties, then
connections from the client address will be refused (along with any
others in the same PerSourceNetBlockSize CIDR range).

Repeated offenses by the same client address will accrue greater
penalties, up to a configurable maximum. A PerSourcePenaltyExemptList
option allows certain address ranges to be exempt from all penalties.

We hope these options will make it significantly more difficult for
attackers to find accounts with weak/guessable passwords or exploit
bugs in sshd(8) itself.

PerSourcePenalties is off by default, but we expect to enable it
automatically in the near future.

much feedback markus@ and others, ok markus@

OpenBSD-Commit-ID: 89ded70eccb2b4926ef0366a4d58a693de366cca
2024-06-07 03:35:40 +10:00
djm@openbsd.org 9ee335aacc
upstream: explain arguments of internal-sftp GHPR#454 from Niklas
Hambüchen
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 0335d641ae6b5b6201b9ffd5dd06345ebbd0a3f3
2024-02-21 17:18:02 +11:00
djm@openbsd.org d1164cb100
upstream: clarify permissions requirements for ChrootDirectory Part
of GHPR#454 from Niklas Hambüchen
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: d37bc8786317a11649c62ff5e2936441186ef7a0
2024-02-21 17:18:01 +11:00
djm@openbsd.org d410e17d18
upstream: .Cm for a keyword. Part of GHPR#454 from Niklas Hambüchen
OpenBSD-Commit-ID: d59c52559f926fa82859035d79749fbb4a3ce18a
2024-02-21 17:18:01 +11:00
jmc@openbsd.org afcc9028bf
upstream: fix incorrect capitalisation;
OpenBSD-Commit-ID: cb07eb06e15fa2334660ac73e98f29b6a1931984
2024-01-11 14:20:29 +11:00
djm@openbsd.org b31b12d28d
upstream: add a "global" ChannelTimeout type to ssh(1) and sshd(8)
that watches all open channels and will close all open channels if there is
no traffic on any of them for the specified interval. This is in addition to
the existing per-channel timeouts added a few releases ago.

This supports use-cases like having a session + x11 forwarding channel
open where one may be idle for an extended period but the other is
actively used. The global timeout would allow closing both channels when
both have been idle for too long.

ok dtucker@

OpenBSD-Commit-ID: 0054157d24d2eaa5dc1a9a9859afefc13d1d7eb3
2024-01-10 09:24:53 +11:00
jmc@openbsd.org 77b8b865cd
upstream: %C is a callable macro in mdoc(7)
so, as we do for %D, escape it;

OpenBSD-Commit-ID: 538cfcddbbb59dc3a8739604319491dcb8e0c0c9
2023-08-01 18:54:13 +10:00
djm@openbsd.org d1ffde6b55
upstream: make sshd_config AuthorizedPrincipalsCommand and
AuthorizedKeysCommand accept the %D (routing domain) and a new %C (connection
address/port 4-tuple) as expansion sequences; ok markus

OpenBSD-Commit-ID: ee9a48bf1a74c4ace71b69de69cfdaa2a7388565
2023-07-28 08:29:21 +10:00
djm@openbsd.org 78571a5fe9
upstream: some options are not first-match-wins. Mention that there
are exceptions at the start of the manpage and label some of them in the
option description.

OpenBSD-Commit-ID: 3b74728446fa6fc8742769eeb8c3674e233e84c4
2023-03-03 16:12:04 +11:00
jmc@openbsd.org bc7de6f91a
upstream: tweak previous; ok djm
OpenBSD-Commit-ID: df71ce4180c58202dfdc1d92626cfe900b91b7c3
2023-02-01 09:20:17 +11:00
djm@openbsd.org 0293c19807
upstream: Add a sshd_config UnusedConnectionTimeout option to terminate
client connections that have no open channels for some length of time. This
complements the recently-added ChannelTimeout option that terminates inactive
channels after a timeout.

ok markus@

OpenBSD-Commit-ID: ca983be74c0350364c11f8ba3bd692f6f24f5da9
2023-01-17 20:50:41 +11:00
jmc@openbsd.org d213d126a4
upstream: tweak previous; ok djm
OpenBSD-Commit-ID: 229c493452766d70a78b0f02f6ff9894f9028858
2023-01-11 11:43:17 +11:00
djm@openbsd.org 2d1ff2b943
upstream: Implement channel inactivity timeouts
This adds a sshd_config ChannelTimeouts directive that allows channels that
have not seen traffic in a configurable interval to be automatically closed.
Different timeouts may be applied to session, X11, agent and TCP forwarding
channels.

Note: this only affects channels over an opened SSH connection and not
the connection itself. Most clients close the connection when their channels
go away, with a notable exception being ssh(1) in multiplexing mode.

ok markus dtucker

OpenBSD-Commit-ID: ae8bba3ed9d9f95ff2e2dc8dcadfa36b48e6c0b8
2023-01-06 16:23:16 +11:00
djm@openbsd.org 1875042c52
upstream: Add RequiredRSASize for sshd(8); RSA keys that fall
beneath this limit will be ignored for user and host-based authentication.

Feedback deraadt@ ok markus@

OpenBSD-Commit-ID: 187931dfc19d51873df5930a04f2d972adf1f7f1
2022-09-17 20:39:02 +10:00
djm@openbsd.org 455cee8d6c upstream: make it clear that RekeyLimit applies to both transmitted
and received data. GHPR#328 from Jan Pazdziora

OpenBSD-Commit-ID: d180a905fec9ff418a75c07bb96ea41c9308c3f9
2022-06-24 14:28:29 +10:00
dtucker@openbsd.org 21042a05c0 upstream: Correct path for system known hosts file in description
of IgnoreUserKnownHosts.  Patch from Martin Vahlensieck via tech@

OpenBSD-Commit-ID: 9b7784f054fa5aa4d63cb36bd563889477127215
2022-04-16 14:36:48 +10:00
naddy@openbsd.org a9f23ea2e3 upstream: ssh: document sntrup761x25519-sha512@openssh.com as
default KEX

OpenBSD-Commit-ID: 12545bfa10bcbf552d04d9d9520d0f4e98b0e171
2022-04-06 09:16:05 +10:00
naddy@openbsd.org da40355234 upstream: RSA/SHA-1 is not used by default anymore on the server
OpenBSD-Commit-ID: 64abef6cfc3e53088225f6b8a1dcd86d52dc8353
2021-12-07 12:30:50 +11:00
dtucker@openbsd.org b711bc01a7 upstream: ssh-rsa is no longer in the default for
PubkeyAcceptedAlgorithms.

OpenBSD-Commit-ID: 34a9e1bc30966fdcc922934ae00f09f2596cd73c
2021-12-03 10:27:40 +11:00
djm@openbsd.org 21b6b5a06c upstream: add the sntrup761x25519-sha512@openssh.com hybrid
ECDH/x25519 + Streamlined NTRU Prime post-quantum KEX to the default
KEXAlgorithms list (after the ECDH methods but before the prime-group DH
ones).

ok markus@

OpenBSD-Commit-ID: 22b77e27a04e497a10e22f138107579652854210
2021-11-10 17:32:18 +11:00
dtucker@openbsd.org 002d65b0a3 upstream: Document that CASignatureAlgorithms, ExposeAuthInfo and
PubkeyAuthOptions can be used in a Match block.  Patch from eehakkin via
github PR#277.

OpenBSD-Commit-ID: c0a63f5f52e918645967ac022b28392da4b866aa
2021-10-09 22:01:49 +11:00
dtucker@openbsd.org eb4362e5e3 upstream: Refer to KEX "algorithms" instead of "methods" to match
other references and improve consistency.  Patch from scop via github PR#241,
ok djm@

OpenBSD-Commit-ID: 840bc94ff6861b28d8603c8e8c16499bfb65e32c
2021-09-03 17:33:08 +10:00
djm@openbsd.org dcce2a2bcf upstream: mention that CASignatureAlgorithms accepts +/- similarly to
the other algorithm list directives; ok jmc bz#3335

OpenBSD-Commit-ID: 0d46b53995817052c78e2dce9dbd133963b073d9
2021-08-13 10:01:15 +10:00
Darren Tucker 9ebd182888 Missing space between macro arg and punctuation.
From jmc@
2021-08-03 21:03:23 +10:00
jmc@openbsd.org bec429338e upstream: word fix; reported by debian at helgefjell de
OpenBSD-Commit-ID: 0c6fd22142422a25343c5bd1a618f31618f41ece
2021-08-03 09:39:57 +10:00
Darren Tucker 4d2d4d47a1 Replace remaining references to ChallengeResponse.
Portable had a few additional references to ChallengeResponse related to
UsePAM, replaces these with equivalent keyboard-interactive ones.
2021-07-03 19:27:43 +10:00
dtucker@openbsd.org c73b02d92d upstream: Remove references to ChallengeResponseAuthentication in
favour of KbdInteractiveAuthentication.  The former is what was in SSHv1, the
latter is what is in SSHv2 (RFC4256) and they were treated as somewhat but
not entirely equivalent.  We retain the old name as deprecated alias so
config files continue to work and a reference in the man page for people
looking for it.

Prompted by bz#3303 which pointed out the discrepancy between the two
when used with Match.  Man page help & ok jmc@, with & ok djm@

OpenBSD-Commit-ID: 2c1bff8e5c9852cfcdab1f3ea94dfef5a22f3b7e
2021-07-02 15:39:29 +10:00
jmc@openbsd.org 320af2f3de upstream: remove stray inserts; from matthias schmidt
OpenBSD-Commit-ID: 2c36ebdc54e14bbf1daad70c6a05479a073d5c63
2021-04-06 19:08:53 +10:00
djm@openbsd.org 53ea05e09b upstream: sync CASignatureAlgorithms lists with reality. GHPR#174 from
Matt Hazinski

OpenBSD-Commit-ID: f05e4ca54d7e67b90fe58fe1bdb1d2a37e0e2696
2021-04-03 17:57:01 +11:00
dtucker@openbsd.org 88057eb6df upstream: Add ModuliFile keyword to sshd_config to specify the
location of the "moduli" file containing the groups for DH-GEX.  This will
allow us to run tests against arbitrary moduli files without having to
install them. ok djm@

OpenBSD-Commit-ID: 8df99d60b14ecaaa28f3469d01fc7f56bff49f66
2021-03-13 13:14:13 +11:00
djm@openbsd.org 351c5dbbd7 upstream: fix alphabetic ordering of options; spotted by Iain Morgan
OpenBSD-Commit-ID: f955fec617d74af0feb5b275831a9fee813d7ad5
2021-02-28 10:54:19 +11:00
djm@openbsd.org 8b8b60542d upstream: lots more s/key types/signature algorithms/ mostly in
HostbasedAcceptedAlgorithms and HostKeyAlgorithms; prompted by Jakub Jelen

OpenBSD-Commit-ID: 3f719de4385b1a89e4323b2549c66aae050129cb
2021-02-24 08:56:22 +11:00
djm@openbsd.org 0aeb508aaa upstream: Correct reference to signature algorithms as keys; from
Jakub Jelen

OpenBSD-Commit-ID: 36f7ecee86fc811aa0f8e21e7a872eee044b4be5
2021-02-24 08:56:22 +11:00
dtucker@openbsd.org e9f78d6b06 upstream: Rename HostbasedKeyTypes (ssh) and
HostbasedAcceptedKeyTypes (sshd) to HostbasedAcceptedAlgorithms, which more
accurately reflects its effect. This matches a previous change to
PubkeyAcceptedAlgorithms.  The previous names are retained as aliases.  ok
djm@

OpenBSD-Commit-ID: 49451c382adc6e69d3fa0e0663eeef2daa4b199e
2021-01-26 22:50:40 +11:00
dtucker@openbsd.org ee9c0da803 upstream: Rename PubkeyAcceptedKeyTypes keyword to
PubkeyAcceptedAlgorithms. While the two were originally equivalent, this
actually specifies the signature algorithms that are accepted.  Some key
types (eg RSA) can be used by multiple algorithms (eg ssh-rsa, rsa-sha2-512)
so the old name is becoming increasingly misleading.  The old name is
retained as an alias. Prompted by bz#3253, help & ok djm@, man page help jmc@

OpenBSD-Commit-ID: 0346b2f73f54c43d4e001089759d149bfe402ca5
2021-01-22 15:03:56 +11:00
rob@openbsd.org a164862dfa upstream: Minor grammatical correction.
OK jmc@

OpenBSD-Commit-ID: de0fad0581e212b2750751e479b79c18ff8cac02
2021-01-18 18:43:43 +11:00
jmc@openbsd.org 7a57adb8b0 upstream: add a comma to previous;
OpenBSD-Commit-ID: 9139433701c0aa86a0d3a6c7afe10d1c9c2e0869
2021-01-11 15:04:12 +11:00
dtucker@openbsd.org 3a92312953 upstream: Add PerSourceMaxStartups and PerSourceNetBlockSize
options which provide more fine grained MaxStartups limits.  Man page help
jmc@, feedback & ok djm@

OpenBSD-Commit-ID: e2f68664e3d02c0895b35aa751c48a2af622047b
2021-01-11 15:04:12 +11:00
djm@openbsd.org 16448ff529 upstream: mention that DisableForwarding is valid in a sshd_config
Match block reported by Fredrik Eriksson in bz3239

OpenBSD-Commit-ID: 3a71c3d84b597f5e43e4b40d5232797daf0993f6
2021-01-08 13:46:35 +11:00
djm@openbsd.org 2c71cec020 upstream: Update/replace the experimental post-quantim hybrid key
exchange method based on Streamlined NTRU Prime (coupled with X25519).

The previous sntrup4591761x25519-sha512@tinyssh.org method is
replaced with sntrup761x25519-sha512@openssh.com. Per the authors,
sntrup4591761 was replaced almost two years ago by sntrup761.

The sntrup761 implementaion, like sntrup4591761 before it, is public
domain code extracted from the SUPERCOP cryptography benchmark
suite (https://bench.cr.yp.to/supercop.html).

Thanks for Daniel J Bernstein for guidance on algorithm selection.
Patch from Tobias Heider; feedback & ok markus@ and myself

(note this both the updated method and the one that it replaced are
disabled by default)

OpenBSD-Commit-ID: 2bf582b772d81ee24e911bb6f4b2aecfd39338ae
2020-12-29 12:38:53 +11:00
jmc@openbsd.org 616029a85a upstream: add space between macro arg and punctuation;
OpenBSD-Commit-ID: bb81e2ed5a77832fe62ab30a915ae67cda57633e
2020-10-17 22:45:37 +11:00
djm@openbsd.org 793b583d09 upstream: LogVerbose keyword for ssh and sshd
Allows forcing maximum debug logging by file/function/line pattern-
lists.

ok markus@

OpenBSD-Commit-ID: c294c25732d1b4fe7e345cb3e044df00531a6356
2020-10-17 00:43:17 +11:00
djm@openbsd.org 12ae8f95e2 upstream: prefer ed25519 signature algorithm variants to ECDSA; ok
markus@

OpenBSD-Commit-ID: 82187926fca96d35a5b5afbc091afa84e0966e5b
2020-10-03 14:34:06 +10:00
jmc@openbsd.org 2a3a982231 upstream: sentence fix; from pedro martelletto
OpenBSD-Commit-ID: f95b84a1e94e9913173229f3787448eea2f8a575
2020-08-31 14:34:34 +10:00