Can a RHEL8 system use /etc/ssh/sshd_config.d configuration folder to override default sshd_config ?

Solution Verified - Updated -

Issue

On RHEL8 by default the directory /etc/ssh/sshd_config.d does not exists. By the other hand the section Include is already supported by the sshd_config.

SSHD_CONFIG(5)                                       BSD File Formats Manual                                       SSHD_CONFIG(5)

NAME
     sshd_config — OpenSSH SSH daemon configuration file

DESCRIPTION
     sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file specified with -f on the command line).  The file
     contains keyword-argument pairs, one per line.  For each keyword, the first obtained value will be used.  Lines starting
     with ‘#’ and empty lines are interpreted as comments.  Arguments may optionally be enclosed in double quotes (") in order to
     represent arguments containing spaces.

     The possible keywords and their meanings are as follows (note that keywords are case-insensitive and arguments are case-sen‐
     sitive):

...

     Include
             Include the specified configuration file(s).  Multiple path names may be specified and each pathname may contain
             glob(7) wildcards.  Files without absolute paths are assumed to be in /etc/ssh.  A Include directive may appear
             inside a Match block to perform conditional inclusion.

...

Environment

  • RHEL8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content