PSM for SSH (PSMP) Integrated Mode Connections Fail with "Access Denied" (PAM / SSHD Configuration)
Symptom
When attempting to connect to a target via PSMP in Integrated Mode:
1. The user enters their Vault password, but the connection immediately drops with an "Access denied" error.
2. Checking the Linux secure log (`/var/log/secure` or `/var/log/auth.log`) reveals one of the following underlying errors:
Scenario A (PAM / SSSD Rejection):
"pam_sss(sshd: account): Access denied for user <VaultUser>%<TargetUser>#<Domain>%<TargetServer>: 10 (User not known to the underlying authentication module)"
Scenario B (SSHD Restriction):
"User <VaultUser> from <IP> not allowed because not listed in AllowUsers"
Environment
14.2;14.6;15.0;14.7;14.8;15.2 Privileged Access Manager (PAM, self-hosted) PSMP
- Products: Privileged Access Manager (PAM, self-hosted), Privilege Cloud
- Components: Privileged Session Manager for SSH (PSM for SSH / PSMP)
- Installation Mode: PSMP Integrated Mode
- OS / Platform: Linux (RHEL, Rocky Linux, AlmaLinux)
- Supported Versions: PAM v14.x v15.x; Privilege Cloud
Cause
Cause A: PAM SSSD Collision
In Integrated Mode, Linux passes the dynamic PSMP connection string to the SSSD authentication module (`pam_sss.so`). Since this dynamic username does not exist in Active Directory/SSSD, access is denied. A PAM bypass rule for the `PSMConnectUsers` group is required to prevent SSSD from rejecting the session.
Cause B: Global SSHD 'AllowUsers' Restriction
If the Linux administrator has secured the PSMP server by defining a global `AllowUsers` list in `/etc/ssh/sshd_config`, any SSH connection string not explicitly listed is blocked. Since PSMP Integrated Mode uses the vault user's name as the SSH username, the SSH daemon blocks the connection before PSMP can process it.
Resolution
Review `/var/log/secure` to determine which error is occurring, and apply the corresponding fix:
Resolution A: Fix PAM Configuration (SSSD Collision)
Add a PAM bypass rule for PSMP users so the authentication phase succeeds before reaching SSSD.
1. Log on to the PSMP server as root.
2. Open the PAM password-auth file (typically `/etc/pam.d/password-auth` or `/etc/pam.d/sshd` depending on OS):
sudo vi /etc/pam.d/password-auth
3. Ensure the following line exists *above* the `account required pam_unix.so` or `account [default=bad success=ok user_unknown=ignore] pam_sss.so` line:
account sufficient pam_succeed_if.so user ingroup PSMConnectUsers quiet
4. Save the file. The change takes effect immediately for new connections.
Resolution B: Fix SSH Daemon Configuration (AllowUsers)
Override the global `AllowUsers` restriction specifically for the PSMP connection block.
1. Log on to the PSMP server as root.
2. Open the SSH daemon configuration file:
sudo vi /etc/ssh/sshd_config
3. To bypass the restriction for PSM connections, apply one of the following two options:
Option 1: Add `AllowUsers *` inside the Idira Match block. This overrides the global restriction only for PSMP users without affecting the rest of the server's security posture:
# PSMP Authentication Configuration Block Start
Match Group PSMConnectUsers
AuthenticationMethods publickey,keyboard-interactive keyboard-interactive
AuthorizedKeysCommand /opt/CARKpsmp/bin/psshkeys_runner.sh
AuthorizedKeysCommandUser root
AllowUsers *
# PSMP Authentication Configuration Block End
Option 2: If Option 1 conflicts with specific organization compliance rules, replace the global `AllowUsers` directive with an `AllowGroups` directive. Add your standard maintenance groups alongside `PSMConnectUsers`:
AllowGroups <Your_Admin_Group> PSMConnectUsers
4. Save the file and restart the SSH daemon:
sudo systemctl restart sshd