# Ensure rsh client is not installed

The 'rsh' (remote shell) protocol is outdated and inherently insecure as it transmits all data, including credentials, in plaintext across the network. This makes it highly susceptible to eavesdropping and man-in-the-middle attacks. Its continued presence on a system poses a significant security risk, as it can be exploited by attackers to gain unauthorized access. The modern, secure alternative is SSH (Secure Shell).
The audit script verifies the system's state by querying the RPM package manager to determine if the 'rsh' package is installed. The remediation script removes this package using the 'yum' package manager, thereby eliminating the insecure client from the system.
The recommended state for all hardening levels (Basic, Moderate, and Strict) is 'Not Installed'. There is no secure configuration for rsh; its existence on a system is a vulnerability. Therefore, its complete removal is the only acceptable security posture to mitigate the associated risks.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['Not Installed']` |
| **Moderate** | `['Not Installed']` |
| **Strict** | `['Not Installed']` |
| **Type** | `ENUM` |

## Audit Script Working

bash script that checks if the 'rsh' package is installed using the 'rpm -q rsh' command. If the command succeeds (exit code 0), the script must output the string 'Installed'. If the command fails (non-zero exit code), it must output 'Not Installed'. The output should be exclusively one of these two strings.

## Remediation Script Working

bash script that accepts one positional argument for the desired state. If the argument is 'Not Installed', the script must use 'yum remove -y rsh' to uninstall the package. The script must return 'true' if the package is successfully removed or was already not installed. It must return 'false' if the uninstallation process fails for any reason.

