You can file an issue about it and ask that it be added.
Table of Contents
OpenSSH
The SSH protocol is recommended for remote login and remote file transfer. SSH provides confidentiality and integrity for data exchanged between two systems, as well as server authentication, through the use of public key cryptography.
Disable empty passwords
Rationale
Configuring this setting for the SSH daemon provides additional assurance that remote login via SSH will require a password, even in the event of misconfiguration elsewhere.
Solution
Explicitly disallow SSH login from accounts with empty passwords
PermitEmptyPasswords no
Idle timeout
Rationale
This ensures a user login will be terminated as soon as the ClientAliveInterval is reached.
Solution
Sets the number of client alive messages
ClientAliveCountMax 0
Idle timeout interval
Rationale
Terminating an idle ssh session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been let unattended.
Solution
Set short time period
ClientAliveInterval 300
Warning banner
Rationale
The warning message reinforces policy awareness during the logon process and facilitates possible legal action against attackers.
Solution
Set short time period
Banner /etc/issue
Hash algorithms
Rationale
DoD Information Systems are required to use FIPS-approved cryptographic hash functions. The only SSHv2 hash algorithms meeting this requirement is SHA2.
Solution
Use of FIPS-approved MACs
MACs hmac-sha2-512,hmac-sha2-256,hmac-sha1
Environment options
Rationale
SSH environment options potentially allow users to bypass access restriction in some configurations.
Solution
Override environment options
PermitUserEnvironment no
Protocol version
Rationale
SSH protocol version 1 is an insecure implementation of the SSH protocol and has many well-known vulnerability exploits. Exploits of the SSH daemon could provide immediate root access to the system.
Solution
Set correct protocol version
Protocol 2
Support for .rhosts
Rationale
SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts.
Solution
Set correct protocol version
IgnoreRhosts yes
Log levels
Rationale
SSH provides several logging levels with varying amounts of verbosity. In many situations, such as Incident Response, it is important to determine when a particular user was active on a system. The INFO parameter specifices that record login and logout activity will be logged.
Solution
Set specify the log level
LogLevel INFO
Validated ciphers
Rationale
Unapproved mechanisms that are used for authentication to the cryptographic module are not verified and therefore cannot be relied upon to provide confidentiality or integrity, and system data may be compromised.
Solution
Set algorithms which are FIPS-approved
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
Remote X11 connections
Rationale
By default, remote X11 connections are not encrypted when initiated by users. Open X displays allow an attacker to capture keystrokes and to execute commands remotely.
Solution
Enable encrypted X11 forwarding
X11Forwarding yes
Authentication
Rationale
SSH trust relationships mean a compromise on one host can allow an attacker to move trivially to other hosts.
Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server.
Solution
Disable host-based authentication
HostbasedAuthentication no
Set authentication attempt limit
MaxAuthTries tries
Root login
Rationale
The root user should never be allowed to login to a system directly over a network.
Solution
Disable root login via SSH
PermitRootLogin no
Useful resources
- Configuring OpenSSH [Official]
Basic information
- GH Page
- GH Repository
- Introduction
- Policy Compliance
- Security Content Automation Protocol (SCAP)
- DevSec Hardening Framework
- Contributing & Support
- License
Core Layer
- Bootloader and Partitions
- Maintaining Software
- Accounts and Access
- Permissions and Limits
- PAM Module
- SELinux
- Auditd
- OpenSSH
Kernel Layer
Extended Layer
Logging & Auditing
System Services
Other Services
Containers
The Practical Linux Hardening Guide provides a high-level overview of the hardening GNU/Linux systems. It is not an official standard or handbook but it touches and use industry standards.