|
33 | 33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
34 | 34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
35 | 35 | .\" |
36 | | -.\" $OpenBSD: sshd_config.5,v 1.355 2024/02/21 06:17:29 djm Exp $ |
37 | | -.Dd $Mdocdate: February 21 2024 $ |
| 36 | +.\" $OpenBSD: sshd_config.5,v 1.359 2024/06/11 01:07:35 djm Exp $ |
| 37 | +.Dd $Mdocdate: June 11 2024 $ |
38 | 38 | .Dt HPNSSHD_CONFIG 5 |
39 | 39 | .Os |
40 | 40 | .Sh NAME |
@@ -1589,6 +1589,75 @@ Values for IPv4 and optionally IPv6 may be specified, separated by a colon. |
1589 | 1589 | The default is |
1590 | 1590 | .Cm 32:128 , |
1591 | 1591 | which means each address is considered individually. |
| 1592 | +.It Cm PerSourcePenalties |
| 1593 | +Controls penalties for various conditions that may represent attacks on |
| 1594 | +.Xr sshd 8 . |
| 1595 | +If a penalty is enforced against a client then its source address and any |
| 1596 | +others in the same network, as defined by |
| 1597 | +.Cm PerSourceNetBlockSize , |
| 1598 | +will be refused connection for a period. |
| 1599 | +.Pp |
| 1600 | +A penalty doesn't affect concurrent connections in progress, but multiple |
| 1601 | +penalties from the same source from concurrent connections will accumulate |
| 1602 | +up to a maximum. |
| 1603 | +Conversely, penalties are not applied until a minimum threshold time has been |
| 1604 | +accumulated. |
| 1605 | +.Pp |
| 1606 | +Penalties are enabled by default with the default settings listed below |
| 1607 | +but may disabled using the |
| 1608 | +.Cm off |
| 1609 | +keyword. |
| 1610 | +The defaults may be overridden by specifying one or more of the keywords below, |
| 1611 | +separated by whitespace. |
| 1612 | +All keywords accept arguments, e.g.\& |
| 1613 | +.Qq crash:2m . |
| 1614 | +.Bl -tag -width Ds |
| 1615 | +.It Cm crash:duration |
| 1616 | +Specifies how long to refuse clients that cause a crash of |
| 1617 | +.Xr sshd 8 (default: 90s). |
| 1618 | +.It Cm authfail:duration |
| 1619 | +Specifies how long to refuse clients that disconnect after making one or more |
| 1620 | +unsuccessful authentication attempts (default: 5s). |
| 1621 | +.It Cm noauth:duration |
| 1622 | +Specifies how long to refuse clients that disconnect without attempting |
| 1623 | +authentication (default: 1s). |
| 1624 | +This timeout should be used cautiously otherwise it may penalise legitimate |
| 1625 | +scanning tools such as |
| 1626 | +.Xr ssh-keyscan 1 . |
| 1627 | +.It Cm grace-exceeded:duration |
| 1628 | +Specifies how long to refuse clients that fail to authenticate after |
| 1629 | +.Cm LoginGraceTime (default: 20s). |
| 1630 | +.It Cm max:duration |
| 1631 | +Specifies the maximum time a particular source address range will be refused |
| 1632 | +access for (default: 10m). |
| 1633 | +Repeated penalties will accumulate up to this maximum. |
| 1634 | +.It Cm min:duration |
| 1635 | +Specifies the minimum penalty that must accrue before enforcement begins |
| 1636 | +(default: 15s). |
| 1637 | +.It Cm max-sources:number |
| 1638 | +Specifies the maximum number of penalise client address ranges to track |
| 1639 | +(default: 65536). |
| 1640 | +.It Cm overflow:mode |
| 1641 | +Controls how the server behaves when |
| 1642 | +.Cm max-sources |
| 1643 | +is exceeded. |
| 1644 | +There are two operating modes: |
| 1645 | +.Cm deny-all , |
| 1646 | +which denies all incoming connections other than those exempted via |
| 1647 | +.Cm PerSourcePenaltyExemptList |
| 1648 | +until a penalty expires, and |
| 1649 | +.Cm permissive , |
| 1650 | +which allows new connections by removing existing penalties early |
| 1651 | +(default: permissive). |
| 1652 | +.El |
| 1653 | +.It Cm PerSourcePenaltyExemptList |
| 1654 | +Specifies a comma-separated list of addresses to exempt from penalties. |
| 1655 | +This list may contain wildcards and CIDR address/masklen ranges. |
| 1656 | +Note that the mask length provided must be consistent with the address - |
| 1657 | +it is an error to specify a mask length that is too long for the address |
| 1658 | +or one with bits set in this host portion of the address. |
| 1659 | +For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. |
| 1660 | +The default is not to exempt any addresses. |
1592 | 1661 | .It Cm PidFile |
1593 | 1662 | Specifies the file that contains the process ID of the |
1594 | 1663 | SSH daemon, or |
|
0 commit comments