How To Prevent Proxy Job Commands From Saving to the User's Shell History File

Document ID : KB000010921
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

When a PROXY job is run from WAAE, several commands get stored in the job owner's shell history file (ex. .bash_history) on the remote target machine. When there is a large number of these job types pointing to a single remote target, the history file has a tendency to be dominated by these proxy job commands. This can make it difficult for a user to utilize shell command history when logged into the target machine for other tasks.

The agent can be configured so that the commands from PROXY jobs do not get stored in the history file.

Instructions:

On the machine where the CA WA Agent for Remote Execution is installed, add the following lines to the custom properties file that was created for the PROXY job's remote target (target_name.properties) under the <AGENT_INSTALL>/config/proxy directory...

loginTask.1.startPrompt=.*
loginTask.1.startPromptRegex=true
loginTask.1.endPrompt=.*
loginTask.1.endPromptRegex=true
loginTask.1.command=export HISTFILE=/dev/null

Save the file and bounce the agent service.

With these lines added, the HISTFILE variable will be reset to /dev/null when the connection is made to the remote target. This prevents the commands that get executed during the proxy job's shell session from getting stored in the history file.