Skip to content

5.2.8 Ensure SSH HostbasedAuthentication is disabled

Audit#

Run the following command:

# sshd -T -C user=root -C host="$(hostname)" -C addr="$(grep $(hostname) /etc/hosts | awk '{print $1}')" | grep hostbasedauthentication

Verify the output matches:

hostbasedauthentication no

Run the following command:

# grep -Ei '^\s*HostbasedAuthentication\s+yes' /etc/ssh/sshd_config

Nothing should be returned.

Remediation#

Edit the /etc/ssh/sshd_config file to set the parameter as follows:

HostbasedAuthentication no

Default Value:

HostbasedAuthentication no