TMA-SOLARIS-6.7
Disable Rhost-based Authentication for SSH
Description
The IgnoreRhosts parameter specifies that existing .rhosts and .shosts files, which may apply to application rather than user logins, will not be used in RhostsRSAAuthentication or HostbasedAuthentication. Setting this parameter forces users to enter a password when authenticating with SSH. Audit: IgnoreRhosts must not be set to no (the default is yes).
How it is checked
Audit method: File pattern
- File
/etc/ssh/sshd_config- Pattern
(?mi)^\s*IgnoreRhosts\s+no\b
How it is fixed
Fix method: Guidance or infrastructure patch
Perform the following to implement the recommended state: # awk '/^IgnoreRhosts/ { $2 = "yes" } { print }' /etc/ssh/sshd_config > /etc/ssh/sshd_config.CIS # mv /etc/ssh/sshd_config.CIS /etc/ssh/sshd_config # svcadm restart svc:/network/ssh This action will only set the IgnoreRhosts line if it already exists in the file to ensure that it is set to the proper value. If the IgnoreRhosts line does not exist in the file, the default setting of Yes is automatically used, so no additional changes are needed.
Properties
- Operating systems
- Any
- Tags
- solarisssh
- Reference
- CIS Oracle Solaris 11.4 Benchmark v1.1.0 - 6.7 Disable Rhost-based Authentication for SSH
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
tmaegis scan --target solaris