PSMP fails to complete the AutoLogon sequence when connecting to RHEL 9 targets using a logon account.
Symptom
Problem Description
PSMP fails to complete the AutoLogon sequence when connecting to RHEL 9 targets using a logon account. Authentication reaches the password prompt successfully, but the session fails during post‑authentication shell prompt detection, resulting in session termination with OpenSSH return code 255.
##############################
Observed Behavior (Logs)
From PSMP logs:
Password prompt is detected:
Updated terminal data: Password:
PSMP repeatedly waits for shell prompt:
Prompt #1 not detected yet
Updated terminal data: [?2004l
Session terminates:
OpenSSH client terminated with return code 255
This indicates authentication completes, but AutoLogon fails during shell prompt parsing.
The following AutoLogon sequences were explicitly tested or suggested in the case:
1. Customer‑tested sequences
.*[$#] >exec su - {Username}
[Pp]assword: >{Password}
.*[$#] *>exec /usr/bin/su - {Username}
.*[Pp]assword: *>{Password}
.*[$#] >exec su - {Username}
.*[Pp]assword:.*>{Password}
.* > exec su - {Username}
.* > {Password}
#Also tested
ShellPromptForAudit = .*
override parameter, EnableTERMParsingForAudit: No
Environment
14.6 Privilege Cloud PSMP
Cause
The reason it failed to parse that prompt was due to terminal appends hidden ANSI escape sequences to the prompts for coloring or terminal control so these ANSI escape sequences aren't visible in the terminal.
Resolution
Please try to add a trailing .* just before the > operator to act as a buffer and absorb any hidden ANSI characters that the terminal spits out after the visible prompt -
Update your sequence in the PVWA to the following:
.*[$#] *.*>exec su - {Username}
.*[Pp]assword:.*>{Password}
When configuring the above - make absolutely sure there are no trailing spaces at the very end of the lines after {Username} or {Password}, as PSMP will literally try to inject them.