Bug 2007288

Summary: Updates in sshd_config.anaconda
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: lorax-templates-rhelAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: jwboyer
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lorax-templates-rhel-9.0-25.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1872892 Environment:
Last Closed: 2022-05-17 12:38:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Stodola 2021-09-23 14:04:26 UTC
+++ This bug was initially created as a clone of Bug #1872892 +++

Description of problem:
While working on bug 1800697, the following updates to the sshd_config.anaconda file were mentioned (see bug 1800697#c23):

* RSAAuthentication is removed
* there is no configuration option KeepAlive
* XAuthLocation is default, Port is default, IgnoreRhosts is default,
  StrictModes is default so not needed to explicitly mention
  [asosedki: unless you explicitly wanted to pin them for some reason]
* PrintMotd should be off as it is printed from pam now

The content of the config file in RHEL-8.3:
[anaconda root@localhost ~]# cat /etc/ssh/sshd_config.anaconda 
Port 22
PermitRootLogin yes
IgnoreRhosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd yes
XAuthLocation /bin/xauth
KeepAlive yes
SyslogFacility AUTHPRIV
RSAAuthentication yes
PasswordAuthentication yes
PermitEmptyPasswords yes
PermitUserEnvironment yes
[anaconda root@localhost ~]#


Version-Release number of selected component (if applicable):
lorax-28.14.54-1.el8

--- Additional comment from Brian Lane on 2020-08-27 01:06:38 CEST ---

pam in the boot.iso doesn't have the motd module included so PrintMotd should stay set to yes. The other suggested changes look fine.

--- Additional comment from Brian Lane on 2020-08-27 23:32:43 CEST ---

Upstream PR - https://github.com/weldr/lorax/pull/1064

Comment 1 Jan Stodola 2021-09-23 14:05:46 UTC
The changes are not applied in RHEL-9, so cloning the bug.

Comment 2 Brian Lane 2021-09-23 16:25:04 UTC
Looks like pam now has the motd module included so this sets 'PrintMotd no'

https://gitlab.com/redhat/centos-stream/rpms/lorax-templates-rhel/-/merge_requests/19

Comment 3 Jan Stodola 2021-10-08 15:59:07 UTC
The changes in lorax-templates-rhel-9.0-25.el9 look good:

PermitRootLogin yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
SyslogFacility AUTHPRIV
PasswordAuthentication yes
PermitEmptyPasswords yes
PermitUserEnvironment yes

Comment 6 Jan Stodola 2021-10-11 16:27:27 UTC
The changes are reflected in /etc/ssh/sshd_config.anaconda in the installation environment and it's possible to login via ssh during the installation process (if "inst.sshd" was present on the kernel command line). There are no errors during login via ssh.

Tested on compose RHEL-9.0.0-20211010.4 with lorax-templates-rhel-9.0-25.el9.

Moving to VERIFIED.

Comment 8 errata-xmlrpc 2022-05-17 12:38:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: lorax-templates-rhel), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2364