<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic psmp vi editor in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296363#M628</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to prevent psmp sessions from closing when users use a vi editor?&lt;/P&gt;&lt;P&gt;My users complain their psmp sessions close after running a vi edit command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried a work around by adding |~ regex rule to the ShellPromptForAudit configuration. It seems to work for 90% of the cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For files which are large, my users get a connection closed by remote host with this error printed at the top of the ssh window. [Error: The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that takes an indefinite period time to locate.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 10:44:57 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2024-04-11T10:44:57Z</dc:date>
    <item>
      <title>psmp vi editor</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296363#M628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to prevent psmp sessions from closing when users use a vi editor?&lt;/P&gt;&lt;P&gt;My users complain their psmp sessions close after running a vi edit command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried a work around by adding |~ regex rule to the ShellPromptForAudit configuration. It seems to work for 90% of the cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For files which are large, my users get a connection closed by remote host with this error printed at the top of the ssh window. [Error: The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that takes an indefinite period time to locate.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 10:44:57 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296363#M628</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2024-04-11T10:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: psmp vi editor</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296364#M629</link>
      <description>&lt;P&gt;full error message:&lt;/P&gt;&lt;P&gt;channel_handle_rfd: channel 0: PSServices Input fatal error occured [Error: The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that takes an indefinite period time to locate.]&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 10:53:05 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296364#M629</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2024-04-11T10:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: psmp vi editor</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296365#M630</link>
      <description>&lt;P&gt;I don't think I've seen this error before, or at least haven't noticed it. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have TerminateOnShellPromptFailure set to Yes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the setting for PromptTimeout (if set)? &lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 10:57:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296365#M630</guid>
      <dc:creator>Mal</dc:creator>
      <dc:date>2024-04-11T10:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: psmp vi editor</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296366#M631</link>
      <description>&lt;P&gt;Hi @Aaron Tan​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like you’re encountering a limitation with the regular expression in the ShellPromptForAudit configuration, specifically when users are working with large files in vi editor. Here are a few suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Please try refactoring the regular expression to make it less complex in ShellPromptForAudit&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Narrow down the scope of the regular expression to focus only on the specific prompts or patterns relevant to the PSMP sessions.&lt;/LI&gt;&lt;LI&gt;Here is a basic example of a regular expression pattern that could potentially be used in the ShellPromptForAudit configuration to match common prompts in vi editor:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^(?:\[[0-9]+[a-zA-Z]*\])?\s*\w*@\w*(?:\:[\w\/]*)?\s*[^#$%&amp;gt;]*[#$%&amp;gt;]\s*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This regular expression attempts to match prompts commonly encountered in vi editor sessions, such as : for command mode or &amp;gt; for insert mode. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, please note that this is a simplified example and may not cover all possible prompts or patterns in your specific environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps !&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 11:15:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296366#M631</guid>
      <dc:creator>M.Vora780263</dc:creator>
      <dc:date>2024-04-11T11:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: psmp vi editor</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296367#M632</link>
      <description>&lt;P&gt;Actually TerminateOnShellPromptFailure is set to No. But I have validated that the ShellPromptForAudit configuration is still in effect. Not sure if this is expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PromptTimeout is set to 300000.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 04:36:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296367#M632</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2024-04-12T04:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: psmp vi editor</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296368#M633</link>
      <description>&lt;P&gt;Malhar is correct, this was due to the complexity of your regex string you made in the ShellPromptForAudit parameter in a later version PSMP after 12.2.5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note, PSMP is checking for prompt constantly to audit the keystrokes. Due to vi updating the whole terminal screen when launching (pushing everything as one output buffer). if the output is over the defined buffer limit, this issue will appear. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not affect nano because it pushes multiple smaller output buffers when it launches, therefore less characters has to be checked at a time against the regex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Optimized regex patterns is considered a good practice (ie: .*) or ask the user using other edit tool ie: nano.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 14:10:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/psmp-vi-editor/m-p/1296368#M633</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2025-08-01T14:10:34Z</dc:date>
    </item>
  </channel>
</rss>

