Other Articles

Servers – Ensure SSH HostbasedAuthentication is Disabled

Support > Fixing Checks > Server

06 March, 2026

This check ensures that SSH HostbasedAuthentication is disabled on the server.

Hostbased authentication allows login based on trusted host relationships using files like .rhosts or /etc/hosts.equiv. If enabled, it can allow unauthorized access if trust relationships are misconfigured or compromised.

Check Details

  • Resource: Server
  • Check: Ensure SSH HostbasedAuthentication is disabled
  • Risk: Enabling HostbasedAuthentication may allow users from trusted hosts to access the system without proper verification, increasing the risk of unauthorized access.

Remediation Steps

  1. Open a terminal session on the server with root or sudo privileges.
  2. Open the SSH configuration file using a text editor:

    sudo nano /etc/ssh/sshd_config
    
  3. Locate the HostbasedAuthentication parameter. If it does not exist, add it manually.
  4. Set the parameter as follows:

    HostbasedAuthentication no
    
  5. Save the file and exit the editor.
  6. Restart the SSH service to apply the changes:

    sudo systemctl restart sshd
    
  7. Verify that the setting has been applied correctly:

    sshd -T | grep hostbasedauthentication
    
  8. Ensure the output displays:

    HostbasedAuthentication no
  9. Perform regular audits to ensure this setting remains enforced.