Skip to content

Remove the OpenSSH Server Package

An XCCDF Rule

Description

The openssh-server package should be removed. The openssh-server package can be removed with the following command:
$ sudo yum erase openssh-server

Rationale

Without protection of the transmitted information, confidentiality, and integrity may be compromised because unprotected communications can be intercepted and either read or altered.

ID
xccdf_org.ssgproject.content_rule_package_openssh-server_removed
Severity
Medium
Updated

Remediation Templates

A Puppet Snippet

include remove_openssh-server
class remove_openssh-server {
  package { 'openssh-server':
    ensure => 'purged',
  }
}

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - disable_strategy
  - low_complexity

script:kickstart

package remove openssh-server

script:bootc

dnf remove openssh-server

Anaconda Pre-Install Instructions

package --remove=openssh-server

A Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
# CAUTION: This remediation script will remove openssh-server
#	   from the system, and may remove any packages
#	   that depend on openssh-server. Execute this
#	   remediation AFTER testing on a non-production