Other Articles

Servers – Enable SSH PAM Authentication

Support > Fixing Checks > Server

06 March, 2026

This check ensures that Pluggable Authentication Modules (PAM) are enabled for SSH on the server.

Enabling PAM allows centralized authentication, account validation, session control, and policy enforcement such as access restrictions based on time, IP, or user roles.

Check Details

  • Resource: Server
  • Check: Ensure SSH PAM authentication is enabled
  • Risk: Disabling PAM may bypass centralized authentication controls and reduce the ability to enforce security policies.

Remediation Steps

  1. Open a terminal session with root or sudo privileges.
  2. Verify if PAM is enabled in SSH configuration:

    sshd -T | grep -i usepam
    
  3. Ensure output shows:

    usepam yes
  4. Edit SSH configuration file:

    sudo nano /etc/ssh/sshd_config
    
  5. Add or modify the following line:

    UsePAM yes
    
  6. Save the file and exit.
  7. Restart SSH service:

    sudo systemctl restart sshd
    
  8. Re-run the audit command to confirm PAM is enabled.
  9. Perform regular audits to ensure PAM remains enabled.