• BDIX
    • BDIX Shared Hosting
    • BDIX Reseller Hosting
    • Cheap BDIX VPS
    • BDIX NVME KVM VPS
    • BDIX NVMe Windows RDP
    • BDIX Windows VPS
  • Hosting
    • Singapore Web Hosting
    • WordPress Hosting
    • Cheap Shared Hosting
    • Turbo Hosting
  • Reseller Hosting
    • Singapore Reseller Hosting
    • USA Reseller Hosting
  • VPS Hosting
    • Cheap VPS
    • USA Survey RDP
    • USA VPS
    • Singapore VPS
    • Germany VPS
  • Domain
    • Register Domain
    • Transfer Domain
    • Domain Promos
Linkedin Twitter Youtube Facebook
  • support@prenhost.com
  • Hosting Flash Sale: Starting at $0.43/mo for a limited time
  • WhatsApp Support
  • Login
newph-transperent- newph-transperent-
  • BDIX
    • BDIX Shared Hosting
    • BDIX Reseller Hosting
    • Cheap BDIX VPS
    • BDIX NVME KVM VPS
    • BDIX NVMe Windows RDP
    • BDIX Windows VPS
  • Hosting
    • Singapore Web Hosting
    • WordPress Hosting
    • Cheap Shared Hosting
    • Turbo Hosting
  • Reseller Hosting
    • Singapore Reseller Hosting
    • USA Reseller Hosting
  • VPS Hosting
    • Cheap VPS
    • USA Survey RDP
    • USA VPS
    • Singapore VPS
    • Germany VPS
  • Domain
    • Register Domain
    • Transfer Domain
    • Domain Promos
Client Area
Client Area

Fixing SSH Login Failure Due to Missing pam_imunify.so on CloudLinux Servers

by sajibe
August 8, 2025
CloudLinux, Imunify360, Linux, WHM

The Problem

On one of our CloudLinux servers (bdvip1), we encountered a strange SSH issue:

  • Root password was correct.

  • sshd_config had PasswordAuthentication yes and PermitRootLogin yes.

  • Still, SSH login was failing repeatedly with “Permission denied”, even though the credentials were correct.

SSH Debug Output

Running SSH in verbose mode:

ssh -vvv root@160.191.128.XXX

Showed this:

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
...
debug1: Next authentication method: password
root@160.191.128.XXX's password:
Permission denied

Root Cause: pam_imunify.so Was Missing

Upon checking system logs:

journalctl -xe | grep sshd

We found this error:

PAM unable to dlopen(/usr/lib64/security/pam_imunify.so): No such file or directory
PAM adding faulty module: /usr/lib64/security/pam_imunify.so

What Is pam_imunify.so?

pam_imunify.so is a PAM (Pluggable Authentication Module) used by Imunify360 to monitor login attempts and enforce security controls.

However, in our case:

  • Imunify360 was removed or not installed properly, so

  • the PAM module pam_imunify.so no longer existed on the server,

  • but the PAM configuration files still referenced it.

This caused PAM authentication to fail for all logins, including SSH—even though the password was correct.


 The Fix

Step 1: Remove All References to pam_imunify.so

Edit or clean up the following files:

sed -i '/pam_imunify.so/d' /etc/pam.d/system-auth
sed -i '/pam_imunify.so/d' /etc/pam.d/password-auth

This removes the broken authentication lines:

auth required pam_imunify.so
auth required pam_imunify.so check_only

These two files are included by almost all login systems (SSH, sudo, console login). If they’re misconfigured, no login will work.

Step 2: Restart SSH

systemctl restart sshd

Step 3: Test SSH Again

ssh root@<your-server-ip>

Now the login should work using your root password.


Optional: Want to Reinstall Imunify360?

If you still want to use Imunify360 and its login protection features:

wget https://repo.imunify360.cloudlinux.com/defence360/i360deploy.sh
bash i360deploy.sh

This will properly reinstall Imunify360 and restore the pam_imunify.so module.


 Conclusion

This issue was caused by leftover PAM configuration after a partial or broken removal of Imunify360. It shows how sensitive PAM configurations are—even a single missing module can block all logins.

Leave a Reply Cancel reply

You must be logged in to post a comment.

Recent Posts

  • Python Selector “IndexError: string index out of range” – Root Cause & Fix (CloudLinux Bug)
  • Fixing SSH Login Failure Due to Missing pam_imunify.so on CloudLinux Servers
  • Fixing Virtualizor Migration Issue: “Task Not Updated on Master from Last 30 Minutes”
  • How to Fix the “No NBD Device Passed to Disconnect – disconnect_nbd()” Error in Virtualizor
  • How to Fix WHMCS Database Crashed (Table Marked as Crashed) Error

Recent Comments

No comments to show.
Suite 10 Capital House, 61 Amhurst Road, London, E8 1LL, United Kingdom,

Company number 15697833

Payment Method
Company
  • About Us
  • News Feed
  • Affiliate Program
  • Knowledgebase
  • Client Area
  • Get in touch
Hosting
  • Singapore Hosting
  • BDIX Shared Hosting
  • WordPress Hosting
  • Cheap Hosting
  • USA Survey RDP
  • Cheap BDIX VPS
Software Hosting
  • OpenCart Hosting
  • Magento Hosting
  • LiteCart Hosting
  • PrestaShop Hosting
  • Moodle Hosting
  • POS Hosting
Join Our Newsletter

We’ll send you news and offers.

Social Media
Facebook-f Linkedin X-twitter Whatsapp

Copyright © 2018 - 2025 PrenHost. All Rights Reserved

Report Abuse/Spam | Terms of Services | Refund Policy | Privacy Policy | Server Status