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 - Anaconda Pre-Install Instructions


package --remove=openssh-server

Remediation - 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 - Puppet

include remove_openssh-server

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

Remediation - Ansible

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

Remediation - script:kickstart


package remove openssh-server

Remediation - script:bootc


dnf remove openssh-server