Session Control Commands
Session Control Commands allow administrators to define commands that are automatically executed during SSH Proxy and Web SSH sessions as part of the session lifecycle. These commands can be configured to run before or after user access is granted, enabling automated session preparation and post-session actions.
A Control Command can optionally include an associated password. When configured, the system executes the defined command, waits for a password prompt if applicable, automatically provides the configured password, and then continues the session flow according to the configuration.
This functionality is supported for both SSH Proxy and Web SSH sessions.
Overview
Control Commands provide a mechanism to automate session-level actions without requiring manual user input. These commands execute within the SSH session context and are fully transparent to auditing and session recording mechanisms.
Typical use cases include:
- Entering privileged or administrative modes on network appliances (similar to Enable Mode on Cisco devices)
- Executing environment preparation commands before user interaction
- Running initialization scripts required for controlled environments
- Triggering logging or context-setting commands at session start
- Executing cleanup or state-reset commands after session completion
Control Commands help standardize session behavior and reduce reliance on manual operational steps.
Supported Session Types
Control Commands are supported for:
- SSH Proxy sessions
- Web SSH sessions
Behavior is consistent across both access methods.
Configuring Control Commands
Control Commands are configured as part of the SSH session settings for the relevant asset or connection profile.
To configure Sesion Control Commands:
- Navigate to the asset's Asset Type page (e.g.
Unix Host) at Management > Asset Types. - Edit the Asset Type and select Add Field.
- Create a new field with Name:
Command Beforeas Type: String. Click Save. - Create a new field with Name:
Command Before Passwordas Type: String and Secured: Enabled. Click Save. - Navigate to the Asset that needs to support Session Control Commands and click Edit.
- Enter the appropriate command in the Command Before field and (optionally, if required), the Command Before Password field.
- Save the asset change and use the Access button to test the functionality.
User Experience
When a Control Command is configured to run before user access:
- The session establishes normally.
- The Control Command is executed automatically.
- If applicable, the password is entered automatically.
After completion, control is released to the user.
From the user’s perspective, the session opens in the resulting state produced by the Control Command (for example, in a specific directory or already in privileged mode).
Example: Session Control *Command Before* example in a Web SSH session.
Example: Session Control *Command Before* example in a SSH Proxy session (native PuTTY client).
When configured to run after authentication or at session completion:
- The command executes automatically at the defined stage.
- The user does not need to manually perform the configured action.
All activity generated by Control Commands is included in session recording and auditing logs, ensuring full visibility and traceability.
Command Password Handling
When a Command Before Password is included:
- The system executes the configured command.
- In the next prompt, the system automatically sends the configured password.
- Control is then transferred to the user (for pre-session commands) or the session continues according to the defined lifecycle stage.
If no Command Before Password is configured, the command is executed without automated password input.
Session Event Reporting
Control Command execution is captured as part of the session event report. This ensures:
- Full audit trail of automated actions
- Visibility into privileged mode transitions
- Consistency with compliance and monitoring policies
Regardless of session type (SSH Proxy or Web SSH), Control Commands are recorded and available for review through standard session reporting mechanisms.


