---
title: Creating White/Black Policy Keys
slug: kronpam-agent-reference-guide-3-7-0/creating-whiteblack-policy-keys
docTags: 
createdAt: 2023-11-08T17:23:45.371Z
---

The execution of commands can be prevented or allowed. The Kron PAM Linux Agent connects to the system calls and subprocess calls to capture the executed commands. All commands executed are captured, even if they are in scripts or defined as an alias, and the policy is applied. Since the Kron PAM Agent has its own OpenSSH server and OpenSSH client, all SSH connections to the agent-installed server and all SSH connections from the agent-installed server are monitored indisputably.&#x20;

To add command policy:&#x20;

:::hint{type="info"}
**Black Key:** Restricted commands.

**White Key:** Allowed commands&#x20;
:::

Log in to the Kron PAM GUI. &#x20;

1. Navigate to **Policy**
2. Click the **Add** button for Policy Keys.&#x20;
3. &#x20;Choose **Type** then click **Next.** &#x20;
4. Enter the query (or regex)
5. Select the policy **Element Type.** &#x20;
6. Click **Save.**

::Image[]{src="https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/-oIy5wcFurVFD0R-26dHC_image.png" size="68" width="460" height="304" position="center" caption="Policy Key" showCaption="true"}

