Files
openssh-rpms/el7
boypt ef31f9cb53 refactor: consolidate UOS20 spec into main openssh.spec via UOS20=1
The UOS 20 build was previously a near-duplicate spec (openssh.uos20.spec)
with only the kernel-panic patch as an intentional difference. The
kerberos5 and gssapi drift was unintentional and caused maintenance pain
upstream changes had to be applied in two places.

Now there is one spec. The kernel-panic patch is gated on a uos20 macro
that compile.sh sets only when UOS20=1 is in the environment, so non-UOS
builds cannot accidentally pick it up. When UOS20=1, PKGREL is prefixed
with 'uos20' so the resulting RPMs are distinguishable from the standard
build (e.g. PKGREL=1 -> uos201).

Delete openssh.uos20.spec, document UOS20=1 in AGENTS.md.
2026-08-07 16:12:21 +08:00
..
2021-08-24 10:18:24 +08:00
2021-08-24 10:18:24 +08:00
2021-08-24 10:18:24 +08:00
2026-01-04 10:21:51 +08:00

OpenSSH RPM Build for EL7+ (EL8/EL9)

This project provides an RPM Spec file designed to build a modern version of OpenSSH on Enterprise Linux 7 (EL7). Thanks to the implementation of systemd, this configuration is also compatible with newer distributions like EL8 and EL9 (including RHEL, CentOS, Rocky Linux, and AlmaLinux).

Key Features

1. Systemd Native Support

Unlike the EL5 and EL6 builds which rely on SysVinit scripts (/etc/init.d/sshd), this spec file configures OpenSSH to run as a native systemd service.

  • Unit File: Installs a standard sshd.service unit file.
  • Management: Fully integrated with systemctl for service management.

2. Forward Compatibility (EL8/EL9)

Because EL7, EL8, and EL9 all share the systemd architecture, this spec file allows the same source configuration to be built and deployed across these major versions with minimal or no changes.

3. Static OpenSSL Compilation

To support the latest OpenSSH features (which require newer cryptography than what EL7 provides by default), this build process:

  • Compiles a modern version of OpenSSL (e.g., 3.0.x) from source.
  • Links it statically into the OpenSSH binaries.
  • Ensures no conflict with the system's default OpenSSL libraries.

Systemd Integration Details

The spec file utilizes specific RPM macros and configurations to handle the systemd lifecycle:

  • Unit Installation: The sshd.service file is installed into %{_unitdir} (typically /usr/lib/systemd/system/).
  • Socket Activation: (If configured) The spec may also include support for sshd.socket for on-demand activation, though the standard service is the default.

Usage

After installing the generated RPM, manage the service using standard systemd commands:

# Enable the service to start at boot
systemctl enable sshd

# Start the service immediately
systemctl start sshd

# Check status
systemctl status sshd

Default Versions

  • OpenSSH: (Defined in version.env, e.g., 10.2p1)
  • OpenSSL: (Defined in version.env, e.g., 3.0.18)