Remove the OpenSSH Client and Server Package
An XCCDF Rule
Description
The openssh
package should be removed.
The openssh
package can be removed with the following command:
$ sudo zypper remove openssh
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_removed
- Severity
- Medium
- Updated
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
# CAUTION: This remediation script will remove openssh
# from the system, and may remove any packages
# that depend on openssh. Execute this
Remediation - Ansible
- name: Ensure openssh is removed
package:
name: openssh
state: absent
when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
tags:
Remediation - Puppet
include remove_openssh
class remove_openssh {
package { 'openssh':
ensure => 'purged',
}